diff options
author | Varshit Pandya <pandyavarshit@gmail.com> | 2023-10-16 18:33:04 +0530 |
---|---|---|
committer | Matt DeVillier <matt.devillier@amd.corp-partner.google.com> | 2023-10-20 14:29:17 +0000 |
commit | 9acc572caa55173a02ad8a6fd86151779552abe5 (patch) | |
tree | d70dccac480fa86ae9ac90ad3a964965ad6e8998 | |
parent | c5122f9f1c4258bd6beb31b4342dba68e54d2f1f (diff) |
soc/amd/genoa: Add Global NVS
Change-Id: I8d64236fc81e848503535db6f52e93328a60404c
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78391
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
-rw-r--r-- | src/mainboard/amd/onyx/dsdt.asl | 2 | ||||
-rw-r--r-- | src/soc/amd/genoa/acpi/globalnvs.asl | 13 | ||||
-rw-r--r-- | src/soc/amd/genoa/include/soc/nvs.h | 22 |
3 files changed, 37 insertions, 0 deletions
diff --git a/src/mainboard/amd/onyx/dsdt.asl b/src/mainboard/amd/onyx/dsdt.asl index ecfe7a5ebe..c7308a9e78 100644 --- a/src/mainboard/amd/onyx/dsdt.asl +++ b/src/mainboard/amd/onyx/dsdt.asl @@ -10,4 +10,6 @@ DefinitionBlock ( ACPI_TABLE_CREATOR, 0x00010001 /* OEM Revision */ ) +{ /* Start of ASL file */ + #include <globalnvs.asl> } /* End of ASL file */ diff --git a/src/soc/amd/genoa/acpi/globalnvs.asl b/src/soc/amd/genoa/acpi/globalnvs.asl new file mode 100644 index 0000000000..23c53ee854 --- /dev/null +++ b/src/soc/amd/genoa/acpi/globalnvs.asl @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/* + * NOTE: The layout of the GNVS structure below must match the layout in + * soc/amd/genoa/include/soc/nvs.h !!! + */ + +Field (GNVS, ByteAcc, NoLock, Preserve) +{ + /* Miscellaneous */ + PM1I, 64, // 0x00 - 0x07 - System Wake Source - PM1 Index + GPEI, 64, // 0x08 - 0x0f - GPE Wake Source +} diff --git a/src/soc/amd/genoa/include/soc/nvs.h b/src/soc/amd/genoa/include/soc/nvs.h new file mode 100644 index 0000000000..cbc9ba9b4d --- /dev/null +++ b/src/soc/amd/genoa/include/soc/nvs.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/* TODO: Check if this is still correct */ + +/* + * NOTE: The layout of the global_nvs structure below must match the layout + * in soc/soc/amd/genoa/acpi/globalnvs.asl !!! + * + */ + +#ifndef AMD_GENOA_NVS_H +#define AMD_GENOA_NVS_H + +#include <stdint.h> + +struct __packed global_nvs { + /* Miscellaneous */ + uint64_t pm1i; /* 0x00 - 0x07 - System Wake Source - PM1 Index */ + uint64_t gpei; /* 0x08 - 0x0f - GPE Wake Source */ +}; + +#endif /* AMD_GENOA_NVS_H */ |