TianoCore EDK2 master
Loading...
Searching...
No Matches
PlatformHookLib.h File Reference

Go to the source code of this file.

Functions

RETURN_STATUS EFIAPI PlatformHookSerialPortInitialize (VOID)
 

Detailed Description

Platform hook library. Platform can provide an implementation of this library class to provide hooks that may be required for some type of platform initialization.

Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PlatformHookLib.h.

Function Documentation

◆ PlatformHookSerialPortInitialize()

RETURN_STATUS EFIAPI PlatformHookSerialPortInitialize ( VOID  )

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.

Return values
RETURN_SUCCESSThe platform specific initialization succeeded.
RETURN_DEVICE_ERRORThe platform specific initialization could not be completed.

Platform hook to retrieve the 16550 UART base address from the platform Device tree and store it in PcdSerialRegisterBase.

Return values
RETURN_SUCCESSSuccess.
RETURN_INVALID_PARAMETERA parameter was invalid.
RETURN_NOT_FOUNDSerial port information not found.
RETURN_PROTOCOL_ERRORInvalid information in the Device Tree.

Platform hook to retrieve the 16550 UART base address from the GUID Hob that caches the UART base address from early boot stage and store it in PcdSerialRegisterBase.

Return values
RETURN_SUCCESSSuccess.
RETURN_NOT_FOUNDSerial Port information not found.

Performs platform specific initialization required for the CPU to access the hardware associated with a SerialPortLib instance. This function does not initialize 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.

Return values
RETURN_SUCCESSThe platform specific initialization succeeded.
RETURN_DEVICE_ERRORThe platform specific initialization could not be completed.

Platform hook to retrieve the 16550 UART base address from the platform Device tree and store it in the reigster LOONGARCH_CSR_KS1.

Return values
RETURN_SUCCESSSuccess.
RETURN_INVALID_PARAMETERA parameter was invalid.
RETURN_NOT_FOUNDSerial port information not found.

Platform hook to retrieve the 16550 UART base address from register LOONGARCH_CSR_KS1 that caches the UART base address from early boot stage and store it in PcdSerialRegisterBase.

Return values
RETURN_SUCCESSSuccess.
RETURN_NOT_FOUNDSerial Port information not found.

Definition at line 33 of file EarlyFdt16550SerialPortHookLib.c.