soc/intel/broadwell/pch: Replace ACPI device NVS
The same functionality can be provided through a runtime-generated SSDT. The remaining parts of device NVS are removed in a follow-up. Since the SSDTs are only loaded after the DSDT (if loaded at all), using SSDT-provided objects outside method bodies is not possible: the objects are not yet in OSPM's ACPI namespace, which causes in ACPI errors. Owing to this, the operation regions used by the _PS0 and _PS3 methods need to be moved into the SSDT, as they depend on the SSDT-provided BAR1 values. Tested on out-of-tree Compal LA-A992P, generated SSDT disassembles with no errors and contains expected values. Linux does not complain either. Change-Id: I89fb658fbb10a8769ebea2e6535c45cd7c212d06 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52520 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
@ -600,6 +600,16 @@ static void pch_lpc_read_resources(struct device *dev)
|
||||
pch_lpc_add_io_resources(dev);
|
||||
}
|
||||
|
||||
static unsigned long acpi_write_serialio_ssdt(unsigned long current, struct acpi_rsdp *rsdp)
|
||||
{
|
||||
printk(BIOS_DEBUG, "ACPI: * SSDT2\n");
|
||||
acpi_header_t *ssdt = (acpi_header_t *)current;
|
||||
acpi_create_serialio_ssdt(ssdt);
|
||||
current += ssdt->length;
|
||||
acpi_add_table(rsdp, ssdt);
|
||||
return acpi_align_current(current);
|
||||
}
|
||||
|
||||
static unsigned long broadwell_write_acpi_tables(const struct device *device,
|
||||
unsigned long current,
|
||||
struct acpi_rsdp *rsdp)
|
||||
@ -610,7 +620,10 @@ static unsigned long broadwell_write_acpi_tables(const struct device *device,
|
||||
PCH_DEV_UART1 : PCH_DEV_UART0,
|
||||
ACPI_ACCESS_SIZE_DWORD_ACCESS);
|
||||
}
|
||||
return acpi_write_hpet(device, current, rsdp);
|
||||
current = acpi_write_hpet(device, current, rsdp);
|
||||
current = acpi_align_current(current);
|
||||
current = acpi_write_serialio_ssdt(current, rsdp);
|
||||
return current;
|
||||
}
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
Reference in New Issue
Block a user