Simon Glass | 9893180 | 2020-09-22 12:44:52 -0600 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright (C) 2019 Intel Corporation. |
| 4 | * |
| 5 | * Taken from coreboot intelblocks/nvs.h |
| 6 | * Copyright 2019 Google LLC |
| 7 | */ |
| 8 | |
| 9 | #ifndef _INTEL_GNVS_H_ |
| 10 | #define _INTEL_GNVS_H_ |
| 11 | |
| 12 | struct __packed acpi_global_nvs { |
| 13 | /* Miscellaneous */ |
| 14 | u8 pcnt; /* 0x00 - Processor Count */ |
| 15 | u8 ppcm; /* 0x01 - Max PPC State */ |
| 16 | u8 lids; /* 0x02 - LID State */ |
| 17 | u8 pwrs; /* 0x03 - AC Power State */ |
| 18 | u8 dpte; /* 0x04 - Enable DPTF */ |
| 19 | u32 cbmc; /* 0x05 - 0x08 - coreboot Memory Console */ |
| 20 | u64 pm1i; /* 0x09 - 0x10 - System Wake Source - PM1 Index */ |
| 21 | u64 gpei; /* 0x11 - 0x18 - GPE Wake Source */ |
| 22 | u64 nhla; /* 0x19 - 0x20 - NHLT Address */ |
| 23 | u32 nhll; /* 0x21 - 0x24 - NHLT Length */ |
| 24 | u32 prt0; /* 0x25 - 0x28 - PERST_0 Address */ |
| 25 | u8 scdp; /* 0x29 - SD_CD GPIO portid */ |
| 26 | u8 scdo; /* 0x2a - GPIO pad offset relative to the community */ |
| 27 | u8 uior; /* 0x2b - UART debug controller init on S3 resume */ |
| 28 | u8 ecps; /* 0x2c - SGX Enabled status */ |
| 29 | u64 emna; /* 0x2d - 0x34 EPC base address */ |
| 30 | u64 elng; /* 0x35 - 0x3C EPC Length */ |
| 31 | u8 unused1[0x100 - 0x3d]; /* Pad out to 256 bytes */ |
| 32 | #ifdef CONFIG_CHROMEOS |
| 33 | /* ChromeOS-specific (0x100 - 0xfff) */ |
| 34 | struct chromeos_acpi chromeos; |
| 35 | #else |
| 36 | u8 unused2[0x1000 - 0x100]; /* Pad out to 4096 bytes */ |
| 37 | #endif |
| 38 | }; |
| 39 | #ifdef CONFIG_CHROMEOS |
| 40 | check_member(acpi_global_nvs, chromeos, GNVS_CHROMEOS_ACPI_OFFSET); |
| 41 | #endif |
| 42 | |
| 43 | #endif /* _INTEL_GNVS_H_ */ |