2 Ssdt Serial Port Fixup Library
4 Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef SSDT_SERIAL_PORT_LIB_H_
10 #define SSDT_SERIAL_PORT_LIB_H_
12 /** Build a SSDT table describing the input serial port.
14 The table created by this function must be freed by FreeSsdtSerialTable.
16 @param [in] AcpiTableInfo Pointer to the ACPI table information.
17 @param [in] SerialPortInfo Serial port to describe in the SSDT table.
18 @param [in] Name The Name to give to the Device.
19 Must be a NULL-terminated ASL NameString
20 e.g.: "DEV0", "DV15.DEV0", etc.
21 @param [in] Uid UID for the Serial Port.
22 @param [out] Table If success, pointer to the created SSDT table.
24 @retval EFI_SUCCESS Table generated successfully.
25 @retval EFI_INVALID_PARAMETER A parameter is invalid.
26 @retval EFI_NOT_FOUND Could not find information.
27 @retval EFI_OUT_OF_RESOURCES Could not allocate memory.
31 BuildSsdtSerialPortTable (
32 IN CONST CM_STD_OBJ_ACPI_TABLE_INFO
* AcpiTableInfo
,
33 IN CONST CM_ARM_SERIAL_PORT_INFO
* SerialPortInfo
,
34 IN CONST CHAR8
* Name
,
36 OUT EFI_ACPI_DESCRIPTION_HEADER
** Table
39 /** Free an SSDT table previously created by
40 the BuildSsdtSerialTable function.
42 @param [in] Table Pointer to a SSDT table allocated by
43 the BuildSsdtSerialTable function.
45 @retval EFI_SUCCESS Success.
49 FreeSsdtSerialPortTable (
50 IN EFI_ACPI_DESCRIPTION_HEADER
* Table
53 /** Validate the Serial Port Information.
55 @param [in] SerialPortInfoTable Table of CM_ARM_SERIAL_PORT_INFO.
56 @param [in] SerialPortCount Count of SerialPort in the table.
58 @retval EFI_SUCCESS Success.
59 @retval EFI_INVALID_PARAMETER Invalid parameter.
63 ValidateSerialPortInfo (
64 IN CONST CM_ARM_SERIAL_PORT_INFO
* SerialPortInfoTable
,
65 IN UINT32 SerialPortCount
68 #endif // SSDT_SERIAL_PORT_LIB_H_