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>
This commit is contained in:
Felix Held 2024-01-11 23:57:38 +01:00
parent 428def4a6b
commit 75c4d44798
2 changed files with 12 additions and 0 deletions

View File

@ -868,6 +868,17 @@ void acpigen_write_BBN(uint8_t base_bus_number)
acpigen_pop_len(); 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) void acpigen_write_LPI_package(u64 level, const struct acpi_lpi_state *states, u16 nentries)
{ {
/* /*

View File

@ -436,6 +436,7 @@ void acpigen_write_PRW(u32 wake, u32 level);
void acpigen_write_STA(uint8_t status); void acpigen_write_STA(uint8_t status);
void acpigen_write_STA_ext(const char *namestring); void acpigen_write_STA_ext(const char *namestring);
void acpigen_write_BBN(uint8_t base_bus_number); void acpigen_write_BBN(uint8_t base_bus_number);
void acpigen_write_SEG(uint8_t segment_group_number);
void acpigen_write_TPC(const char *gnvs_tpc_limit); void acpigen_write_TPC(const char *gnvs_tpc_limit);
void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat,
u32 busmLat, u32 control, u32 status); u32 busmLat, u32 control, u32 status);