[acpi] Remove userptr_t from ACPI table parsing

Simplify the ACPI table parsing code by assuming that all table
content is fully accessible via pointer dereferences.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-04-22 14:13:45 +01:00
parent c059b34170
commit 0b3fc48fef
14 changed files with 152 additions and 162 deletions

View File

@@ -42,7 +42,7 @@ struct linux_acpi_table {
/** Index */
unsigned int index;
/** Cached data */
userptr_t data;
void *data;
};
/** List of cached ACPI tables */
@@ -53,9 +53,10 @@ static LIST_HEAD ( linux_acpi_tables );
*
* @v signature Requested table signature
* @v index Requested index of table with this signature
* @ret table Table, or UNULL if not found
* @ret table Table, or NULL if not found
*/
static userptr_t linux_acpi_find ( uint32_t signature, unsigned int index ) {
static const struct acpi_header * linux_acpi_find ( uint32_t signature,
unsigned int index ) {
struct linux_acpi_table *table;
struct acpi_header *header;
union {
@@ -121,7 +122,7 @@ static userptr_t linux_acpi_find ( uint32_t signature, unsigned int index ) {
err_read:
free ( table );
err_alloc:
return UNULL;
return NULL;
}
/**