From 9776f6ece1104cc32de3249844a8a7387112f32f Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 1 Mar 2021 00:08:23 +0000 Subject: [acpi] Allow for platforms that provide ACPI tables individually The ACPI API currently expects platforms to provide access to a single contiguous ACPI table. Some platforms (e.g. Linux userspace) do not provide a convenient way to obtain the entire ACPI table, but do provide access to individual tables. All iPXE consumers of the ACPI API require access only to individual tables. Redefine the internal API to make acpi_find() an API method, with all existing implementations delegating to the current RSDT-based implementation. Signed-off-by: Michael Brown --- src/core/acpi.c | 4 ++-- src/core/null_acpi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/acpi.c b/src/core/acpi.c index 7551173..52eb63a 100644 --- a/src/core/acpi.c +++ b/src/core/acpi.c @@ -83,13 +83,13 @@ void acpi_fix_checksum ( struct acpi_header *acpi ) { } /** - * Locate ACPI table + * Locate ACPI table via RSDT * * @v signature Requested table signature * @v index Requested index of table with this signature * @ret table Table, or UNULL if not found */ -userptr_t acpi_find ( uint32_t signature, unsigned int index ) { +userptr_t acpi_find_via_rsdt ( uint32_t signature, unsigned int index ) { struct acpi_header acpi; struct acpi_rsdt *rsdtab; typeof ( rsdtab->entry[0] ) entry; diff --git a/src/core/null_acpi.c b/src/core/null_acpi.c index 90c7848..acca378 100644 --- a/src/core/null_acpi.c +++ b/src/core/null_acpi.c @@ -1,3 +1,3 @@ #include -PROVIDE_ACPI_INLINE ( null, acpi_find_rsdt ); +PROVIDE_ACPI_INLINE ( null, acpi_find ); -- cgit v1.1