diff options
author | Chao Li <lichao@loongson.cn> | 2024-01-16 20:26:22 +0800 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2024-02-06 23:51:47 +0800 |
commit | 0cca97e0a839eac1a333193d7811a32ad5c44c5f (patch) | |
tree | 19983fd222ac89d530ed9ef172713ea8187117e5 /ArmVirtPkg/Include/Library | |
parent | 5a3788bfca0b305044704bdb02d582f49974c9f3 (diff) | |
download | edk2-0cca97e0a839eac1a333193d7811a32ad5c44c5f.tar.gz edk2-0cca97e0a839eac1a333193d7811a32ad5c44c5f.tar.bz2 edk2-0cca97e0a839eac1a333193d7811a32ad5c44c5f.zip |
ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg
Move the FdtSerialPortAddressLib to Ovmfpkg so that other ARCH can
easily use it.
Build-tested only (with "ArmVirtQemu.dsc and OvmfPkgX64.dsc").
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'ArmVirtPkg/Include/Library')
-rw-r--r-- | ArmVirtPkg/Include/Library/FdtSerialPortAddressLib.h | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/ArmVirtPkg/Include/Library/FdtSerialPortAddressLib.h b/ArmVirtPkg/Include/Library/FdtSerialPortAddressLib.h deleted file mode 100644 index 3d4c911f58..0000000000 --- a/ArmVirtPkg/Include/Library/FdtSerialPortAddressLib.h +++ /dev/null @@ -1,83 +0,0 @@ -/** @file
- Determine the base addresses of serial ports from the Device Tree.
-
- Copyright (C) Red Hat
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef FDT_SERIAL_PORT_ADDRESS_LIB_H_
-#define FDT_SERIAL_PORT_ADDRESS_LIB_H_
-
-#include <Base.h>
-
-typedef struct {
- UINTN NumberOfPorts;
- UINT64 BaseAddress[2];
-} FDT_SERIAL_PORTS;
-
-/**
- Collect the first ARRAY_SIZE (Ports->BaseAddress) serial ports into Ports from
- DeviceTree.
-
- @param[in] DeviceTree The flat device tree (FDT) to scan.
-
- @param[in] Compatible Look for Compatible in the "compatible" property of the
- scanned nodes.
-
- @param[out] Ports On successful return, Ports->NumberOfPorts contains the
- number of serial ports found; it is (a) positive and
- (b) at most ARRAY_SIZE (Ports->BaseAddress). If the FDT
- had more serial ports, those are not reported. On
- error, the contents of Ports are indeterminate.
-
- @retval RETURN_INVALID_PARAMETER DeviceTree does not point to a valid FDT
- header.
-
- @retval RETURN_NOT_FOUND No compatible and enabled serial port has
- been found.
-
- @retval RETURN_SUCCESS At least one compatible and enabled serial
- port has been found; Ports has been filled
- in.
-**/
-RETURN_STATUS
-EFIAPI
-FdtSerialGetPorts (
- IN CONST VOID *DeviceTree,
- IN CONST CHAR8 *Compatible,
- OUT FDT_SERIAL_PORTS *Ports
- );
-
-/**
- Fetch the base address of the serial port identified in the "stdout-path"
- property of the "/chosen" node in DeviceTree.
-
- @param[in] DeviceTree The flat device tree (FDT) to scan.
-
- @param[out] BaseAddress On success, the base address of the preferred serial
- port (to be used as console). On error, BaseAddress
- is not modified.
-
- @retval RETURN_INVALID_PARAMETER DeviceTree does not point to a valid FDT
- header.
-
- @retval RETURN_NOT_FOUND No enabled console port has been found.
-
- @retval RETURN_PROTOCOL_ERROR The first (or only) node path in the
- "stdout-path" property is an empty string.
-
- @retval RETURN_PROTOCOL_ERROR The console port has been found in the FDT,
- but its base address is not correctly
- represented.
-
- @retval RETURN_SUCCESS BaseAddress has been populated.
-**/
-RETURN_STATUS
-EFIAPI
-FdtSerialGetConsolePort (
- IN CONST VOID *DeviceTree,
- OUT UINT64 *BaseAddress
- );
-
-#endif
|