summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2021-03-23 09:41:12 +0000
committerpatrick <patrick@openbsd.org>2021-03-23 09:41:12 +0000
commiteeb8d4725bb547b9e48e7cf690b06be1f2f06587 (patch)
treefafb6aed02a2158a8a6d6c2ac8c52fde6a2b6d5c
parentNow that MSI pages are properly mapped, all that debug code in smmu(4) (diff)
downloadwireguard-openbsd-eeb8d4725bb547b9e48e7cf690b06be1f2f06587.tar.xz
wireguard-openbsd-eeb8d4725bb547b9e48e7cf690b06be1f2f06587.zip
Pack the SPCR struct definition since the struct isn't naturally aligned
or padded, and hence e. g. the access to the PCI vendor/device id would be broken. The structs for the other tables all seem to be packed as well. ok kettenis@
-rw-r--r--sys/arch/arm64/stand/efiboot/efiacpi.c4
-rw-r--r--sys/dev/acpi/acpireg.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efiacpi.c b/sys/arch/arm64/stand/efiboot/efiacpi.c
index 4256a7fbfdb..4b315cc8c1c 100644
--- a/sys/arch/arm64/stand/efiboot/efiacpi.c
+++ b/sys/arch/arm64/stand/efiboot/efiacpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efiacpi.c,v 1.10 2021/03/11 11:16:56 jsg Exp $ */
+/* $OpenBSD: efiacpi.c,v 1.11 2021/03/23 09:41:12 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
@@ -340,7 +340,7 @@ struct acpi_spcr {
uint32_t pci_flags;
uint8_t pci_segment;
uint32_t reserved3;
-};
+} __packed;
/* We'll never see ACPI 1.0 tables on ARM. */
static EFI_GUID acpi_guid = ACPI_20_TABLE_GUID;
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h
index 0c80c31d044..f2ff1f02564 100644
--- a/sys/dev/acpi/acpireg.h
+++ b/sys/dev/acpi/acpireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpireg.h,v 1.54 2021/03/15 22:40:23 patrick Exp $ */
+/* $OpenBSD: acpireg.h,v 1.55 2021/03/23 09:41:12 patrick Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
@@ -448,7 +448,7 @@ struct acpi_spcr {
uint32_t pci_flags;
uint8_t pci_segment;
uint32_t reserved3;
-};
+} __packed;
struct acpi_facs {
uint8_t signature[4];