diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-08-19 08:23:48 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-08-19 08:23:48 +0000 |
commit | 63e6caa26564e0dc0de5c358a1401413ea2b7e8c (patch) | |
tree | a405a2c32a4101e6ed60be302e4d8a4c085934fa /sys/dev/acpi/acpireg.h | |
parent | 189364187b38c0928ee75abd2ed96ab3637938f6 (diff) |
Add support for multiple PCI segments. Only really implemented for arm64
for now as amd64/i386 firmware still caters for legacy OSes that only
support a single PCI segment.
ok patrick@
Diffstat (limited to 'sys/dev/acpi/acpireg.h')
-rw-r--r-- | sys/dev/acpi/acpireg.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h index 6906074507d..76e92fcb85d 100644 --- a/sys/dev/acpi/acpireg.h +++ b/sys/dev/acpi/acpireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpireg.h,v 1.42 2018/07/01 10:26:17 kettenis Exp $ */ +/* $OpenBSD: acpireg.h,v 1.43 2018/08/19 08:23:47 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> @@ -410,6 +410,9 @@ struct acpi_mcfg { struct acpi_table_header hdr; #define MCFG_SIG "MCFG" uint8_t reserved[8]; +} __packed; + +struct acpi_mcfg_entry { uint64_t base_address; uint16_t segment; uint8_t min_bus_number; @@ -671,11 +674,12 @@ struct acpi_ivrs { */ #define ACPI_ADR_PCIDEV(addr) (uint16_t)(addr >> 16) #define ACPI_ADR_PCIFUN(addr) (uint16_t)(addr & 0xFFFF) -#define ACPI_PCI_BUS(addr) (uint16_t)((addr) >> 48) -#define ACPI_PCI_DEV(addr) (uint16_t)((addr) >> 32) + +#define ACPI_PCI_SEG(addr) (uint16_t)((addr) >> 48) +#define ACPI_PCI_BUS(addr) (uint8_t)((addr) >> 40) +#define ACPI_PCI_DEV(addr) (uint8_t)((addr) >> 32) #define ACPI_PCI_FN(addr) (uint16_t)((addr) >> 16) #define ACPI_PCI_REG(addr) (uint16_t)(addr) -#define ACPI_PCI_ADDR(b,d,f,r) ((uint64_t)(b)<<48LL | (uint64_t)(d)<<32LL | (f)<<16LL | (r)) /* * PM1 Status Registers Fixed Hardware Feature Status Bits |