diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-01-11 23:57:38 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-13 17:17:18 +0000 |
commit | 75c4d4479808c3d959661b47823a0932dfd2eb40 (patch) | |
tree | aaa7e022b9acfb3c43113ed74bad4986a14b423d /src/acpi/acpigen.c | |
parent | 428def4a6b7cae6b822270bc7231db81ca5ead05 (diff) |
acpi/acpigen: add acpigen_write_SEG for segment group number method
Introduce acpigen_write_SEG to generate the ACPI method object that
returns the PCI segment group number for a PCI(e) host bridge.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I94837fdbe140ee1ff904ffd20bdab3e86f850774
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79923
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Diffstat (limited to 'src/acpi/acpigen.c')
-rw-r--r-- | src/acpi/acpigen.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index 64ec7343e1..257bd52c3e 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -868,6 +868,17 @@ void acpigen_write_BBN(uint8_t base_bus_number) acpigen_pop_len(); } +void acpigen_write_SEG(uint8_t segment_group_number) +{ + /* + * Method (_SEG, 0, NotSerialized) { Return (status) } + */ + acpigen_write_method("_SEG", 0); + acpigen_emit_byte(RETURN_OP); + acpigen_write_byte(segment_group_number); + acpigen_pop_len(); +} + void acpigen_write_LPI_package(u64 level, const struct acpi_lpi_state *states, u16 nentries) { /* |