BayTrail/AaeonIoPkg/W83627DHG/W83627DHGPlatformHookSerialPortLib.c

74 lines
3.5 KiB
C
Raw Normal View History

2022-09-01 01:53:05 -07:00
//**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2013, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
//** **
//** Phone: (770)-246-8600 **
//** **
//**********************************************************************
//**********************************************************************
//**********************************************************************
//<AMI_FHDR_START>
//
// Name: <W83627DHGPlatformHookSerialPortLib.c>
//
// Description:
//
//<AMI_FHDR_END>
//**********************************************************************
//-------------------------------------------------------------------------
// Include Files
//-------------------------------------------------------------------------
#include <Library/PlatformHookLib.h>
#include <W83627DHGPlatformHookSerialPortLib.h>
/**
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 RETURN_DEVICE_ERROR The platform specific initialization could not be completed.
**/
RETURN_STATUS
EFIAPI
PlatformHookSerialPortInitialize (
VOID
)
{
//1. Decode
UINT8 index;
for(index=0; index<sizeof(W83627DHGSerialPortDebugDecodeTable)/sizeof(IO_DECODE_DATA); index++)
AmiSioLibSetLpcDeviceDecoding(NULL, \
W83627DHGSerialPortDebugDecodeTable[index].BaseAdd, \
W83627DHGSerialPortDebugDecodeTable[index].UID, \
W83627DHGSerialPortDebugDecodeTable[index].Type);
//2. Enable IO
//3. Set Serial port address
ProgramRtRegisterTable(0x00, W83627DHGSerialPortDebugInitTable, sizeof(W83627DHGSerialPortDebugInitTable)/sizeof(SIO_DEVICE_INIT_DATA));
return RETURN_SUCCESS;
}
//**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2013, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
//** **
//** Phone: (770)-246-8600 **
//** **
//**********************************************************************
//**********************************************************************