summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-06-24 10:38:45 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-06-24 10:38:45 +0000
commit55f3b637fb79201b185463f48f6ba6b9c77620f8 (patch)
tree690b28a14e5a80991c415dfde3f7c86f75585c17 /sys/dev/acpi
parent106fec6e99768aba6188d4e652e00e98a27a446c (diff)
If ACPI tables are present, set a global variable to point at their
(physical) address such that acpidump(8) can read it and dump the tables on arm64 systems. ok deraadt@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/efi.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/dev/acpi/efi.h b/sys/dev/acpi/efi.h
index a3500787958..d747a2f4315 100644
--- a/sys/dev/acpi/efi.h
+++ b/sys/dev/acpi/efi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: efi.h,v 1.2 2018/01/04 14:30:08 kettenis Exp $ */
+/* $OpenBSD: efi.h,v 1.3 2018/06/24 10:38:44 kettenis Exp $ */
/* Public Domain */
@@ -13,7 +13,6 @@ typedef uint64_t UINT64;
typedef u_long UINTN;
typedef uint16_t CHAR16;
typedef void VOID;
-typedef uint32_t EFI_GUID[4];
typedef uint64_t EFI_PHYSICAL_ADDRESS;
typedef uint64_t EFI_VIRTUAL_ADDRESS;
typedef UINTN EFI_STATUS;
@@ -23,6 +22,17 @@ typedef VOID *EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
typedef VOID *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL;
typedef VOID *EFI_BOOT_SERVICES;
+typedef struct {
+ UINT32 Data1;
+ UINT16 Data2;
+ UINT16 Data3;
+ UINT8 Data4[8];
+} EFI_GUID;
+
+#define EFI_ACPI_20_TABLE_GUID \
+ { 0x8868e871, 0xe4f1, 0x11d3, \
+ { 0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
+
typedef enum {
EfiReservedMemoryType,
EfiLoaderCode,
@@ -130,4 +140,6 @@ typedef struct {
#define EFI_SUCCESS 0
-#endif /* _MACHINE_EFI_H_ */
+#define efi_guidcmp(_a, _b) memcmp((_a), (_b), sizeof(EFI_GUID))
+
+#endif /* _DEV_ACPI_EFI_H_ */