Home | History | Annotate | Download | only in BsSerialStatusCode
      1 /*++
      2 
      3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
      4 This program and the accompanying materials
      5 are licensed and made available under the terms and conditions of the BSD License
      6 which accompanies this distribution.  The full text of the license may be found at
      7 http://opensource.org/licenses/bsd-license.php
      8 
      9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 
     12 Module Name:
     13 
     14   BsSerialStatusCode.h
     15 
     16 Abstract:
     17 
     18   Lib to provide Serial I/O status code routines.  This uses the PEI library
     19   print functions.
     20 
     21 --*/
     22 
     23 #ifndef _EFI_BS_SERIAL_STATUS_CODE_H_
     24 #define _EFI_BS_SERIAL_STATUS_CODE_H_
     25 
     26 //
     27 // Statements that include other files
     28 //
     29 #include "Tiano.h"
     30 #include "Pei.h"
     31 #include "PeiLib.h"
     32 #include "EfiRuntimeLib.h"
     33 #include "BsSerialStatusCodeLib.h"
     34 
     35 //
     36 // GUID consumed
     37 //
     38 #include EFI_GUID_DEFINITION (StatusCodeDataTypeId)
     39 
     40 //
     41 // ---------------------------------------------
     42 // UART Register Offsets
     43 // ---------------------------------------------
     44 //
     45 #define BAUD_LOW_OFFSET   0x00
     46 #define BAUD_HIGH_OFFSET  0x01
     47 #define IER_OFFSET        0x01
     48 #define LCR_SHADOW_OFFSET 0x01
     49 #define FCR_SHADOW_OFFSET 0x02
     50 #define IR_CONTROL_OFFSET 0x02
     51 #define FCR_OFFSET        0x02
     52 #define EIR_OFFSET        0x02
     53 #define BSR_OFFSET        0x03
     54 #define LCR_OFFSET        0x03
     55 #define MCR_OFFSET        0x04
     56 #define LSR_OFFSET        0x05
     57 #define MSR_OFFSET        0x06
     58 
     59 //
     60 // ---------------------------------------------
     61 // UART Register Bit Defines
     62 // ---------------------------------------------
     63 //
     64 #define LSR_TXRDY 0x20
     65 #define LSR_RXDA  0x01
     66 #define DLAB      0x01
     67 
     68 //
     69 // Globals for Serial Port settings
     70 //
     71 extern UINT16 gComBase;
     72 extern UINTN  gBps;
     73 extern UINT8  gData;
     74 extern UINT8  gStop;
     75 extern UINT8  gParity;
     76 extern UINT8  gBreakSet;
     77 
     78 VOID
     79 DebugSerialPrint (
     80   IN UINT8    *OutputString
     81   );
     82 
     83 VOID
     84 DebugSerialWrite (
     85   IN UINT8  Character
     86   );
     87 
     88 #endif
     89