70 lines
3.6 KiB
C
70 lines
3.6 KiB
C
//**********************************************************************
|
|
//**********************************************************************
|
|
//** **
|
|
//** (C)Copyright 1985-2014, American Megatrends, Inc. **
|
|
//** **
|
|
//** All Rights Reserved. **
|
|
//** **
|
|
//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
|
|
//** **
|
|
//** Phone: (770)-246-8600 **
|
|
//** **
|
|
//**********************************************************************
|
|
//**********************************************************************
|
|
/** @file IT8625PlatformHookSerialPortLib.c
|
|
The file initialize the serial port for PlatformHookLib.
|
|
**/
|
|
|
|
//----------------------------------------------------------------------
|
|
// Include Files
|
|
//----------------------------------------------------------------------
|
|
#include <Token.h>
|
|
#include <Library/AmiSioPeiLib.h>
|
|
|
|
extern IO_DECODE_DATA IT8625SerialPortDebugDecodeTable[];
|
|
extern UINT8 IT8625SerialPortDebugDecodeTableCount;
|
|
extern SIO_DEVICE_INIT_DATA IT8625SerialPortDebugInitTable[];
|
|
extern UINT8 IT8625SerialPortDebugInitTableCount;
|
|
/**
|
|
Performs platform specific initialization required for the CPU to access
|
|
the hardware associated with a SerialPortLib instance. This function does
|
|
not intiailzie the serial port hardware itself. Instead, it initializes
|
|
hardware devices that are required for the CPU to access the serial port
|
|
hardware. This function may be called more than once.
|
|
|
|
@retval RETURN_SUCCESS The platform specific initialization succeeded.
|
|
@retval Others The platform specific initialization could not be completed.
|
|
**/
|
|
RETURN_STATUS
|
|
EFIAPI
|
|
PlatformHookSerialPortInitialize (VOID)
|
|
{
|
|
//1. Decode
|
|
UINT8 index;
|
|
|
|
for(index=0; index<IT8625SerialPortDebugDecodeTableCount; index++)
|
|
AmiSioLibSetLpcDeviceDecoding(NULL, \
|
|
IT8625SerialPortDebugDecodeTable[index].BaseAdd, \
|
|
IT8625SerialPortDebugDecodeTable[index].UID, \
|
|
IT8625SerialPortDebugDecodeTable[index].Type);
|
|
//2. Enable IO
|
|
//3. Set Serial port address
|
|
ProgramRtRegisterTable(0x00, IT8625SerialPortDebugInitTable, IT8625SerialPortDebugInitTableCount);
|
|
|
|
return RETURN_SUCCESS;
|
|
}
|
|
|
|
//**********************************************************************
|
|
//**********************************************************************
|
|
//** **
|
|
//** (C)Copyright 1985-2014, American Megatrends, Inc. **
|
|
//** **
|
|
//** All Rights Reserved. **
|
|
//** **
|
|
//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
|
|
//** **
|
|
//** Phone: (770)-246-8600 **
|
|
//** **
|
|
//**********************************************************************
|
|
//**********************************************************************
|