diff options
Diffstat (limited to 'src/acpi')
-rw-r--r-- | src/acpi/Kconfig | 3 | ||||
-rw-r--r-- | src/acpi/gnvs.c | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/acpi/Kconfig b/src/acpi/Kconfig index 2727889f9e..11e703c606 100644 --- a/src/acpi/Kconfig +++ b/src/acpi/Kconfig @@ -30,6 +30,9 @@ config ACPI_SOC_NVS Set to indicate <soc/nvs.h> exists for the platform with a definition for global_nvs. +config ACPI_HAS_DEVICE_NVS + bool + config ACPI_NO_PCAT_8259 bool help diff --git a/src/acpi/gnvs.c b/src/acpi/gnvs.c index a895a83e83..18c1b33130 100644 --- a/src/acpi/gnvs.c +++ b/src/acpi/gnvs.c @@ -39,7 +39,7 @@ void acpi_create_gnvs(void) gnvs_size = sizeof(struct global_nvs); if (gnvs_size < 0x100) gnvs_size = 0x100; - if (gnvs_size > 0x1000) + if (CONFIG(ACPI_HAS_DEVICE_NVS)) gnvs_size = 0x2000; else if (CONFIG(MAINBOARD_HAS_CHROMEOS)) gnvs_size = 0x1000; @@ -57,6 +57,11 @@ void acpi_create_gnvs(void) gnvs_assign_chromeos((u8 *)gnvs + GNVS_CHROMEOS_ACPI_OFFSET); } +void *acpi_get_device_nvs(void) +{ + return (u8 *)gnvs + GNVS_DEVICE_NVS_OFFSET; +} + void acpi_fill_gnvs(void) { if (!gnvs) @@ -68,4 +73,10 @@ void acpi_fill_gnvs(void) acpigen_write_scope("\\"); acpigen_write_name_dword("NVSA", (uintptr_t)gnvs); acpigen_pop_len(); + + if (CONFIG(ACPI_HAS_DEVICE_NVS)) { + acpigen_write_scope("\\"); + acpigen_write_name_dword("NVSD", (uintptr_t)gnvs + GNVS_DEVICE_NVS_OFFSET); + acpigen_pop_len(); + } } |