mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
acpi: Add a method to write tables for a device
A device may want to write out ACPI tables to describe itself to Linux. Add a method to permit this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
This commit is contained in:
@@ -9,9 +9,8 @@
|
||||
#include <acpi/acpi_table.h>
|
||||
#include <dm.h>
|
||||
#include <cpu.h>
|
||||
#include <version.h>
|
||||
|
||||
/* Temporary change to ensure bisectability */
|
||||
#ifndef CONFIG_SANDBOX
|
||||
int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
|
||||
{
|
||||
struct acpi_table_header *header = &dmar->header;
|
||||
@@ -37,7 +36,6 @@ int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int acpi_get_table_revision(enum acpi_tables table)
|
||||
{
|
||||
@@ -91,3 +89,12 @@ int acpi_get_table_revision(enum acpi_tables table)
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
void acpi_fill_header(struct acpi_table_header *header, char *signature)
|
||||
{
|
||||
memcpy(header->signature, signature, 4);
|
||||
memcpy(header->oem_id, OEM_ID, 6);
|
||||
memcpy(header->oem_table_id, OEM_TABLE_ID, 8);
|
||||
header->oem_revision = U_BOOT_BUILD_DATE;
|
||||
memcpy(header->aslc_id, ASLC_ID, 4);
|
||||
}
|
||||
|
Reference in New Issue
Block a user