2020-04-05 13:20:46 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
/* This file is part of the coreboot project. */
|
2015-06-09 22:42:55 +02:00
|
|
|
|
|
|
|
#include <arch/ioapic.h>
|
2019-03-06 09:30:17 +01:00
|
|
|
#include <arch/acpi.h>
|
2015-06-10 05:18:38 +02:00
|
|
|
#include <soc/acpi.h>
|
|
|
|
#include <soc/nvs.h>
|
2016-12-18 18:59:58 +01:00
|
|
|
#include <variant/thermal.h>
|
2015-06-10 05:18:38 +02:00
|
|
|
|
2015-06-09 22:42:55 +02:00
|
|
|
void acpi_create_gnvs(global_nvs_t *gnvs)
|
|
|
|
{
|
2015-06-10 05:18:38 +02:00
|
|
|
acpi_init_gnvs(gnvs);
|
|
|
|
|
2015-06-09 22:42:55 +02:00
|
|
|
/* Enable USB ports in S3 */
|
|
|
|
gnvs->s3u0 = 1;
|
|
|
|
|
|
|
|
/* Disable USB ports in S5 */
|
|
|
|
gnvs->s5u0 = 0;
|
|
|
|
|
2019-10-21 21:42:17 +02:00
|
|
|
gnvs->tmps = CTL_TDP_SENSOR_ID;
|
|
|
|
gnvs->tcrt = CRITICAL_TEMPERATURE;
|
|
|
|
gnvs->tpsv = PASSIVE_TEMPERATURE;
|
|
|
|
gnvs->tmax = MAX_TEMPERATURE;
|
|
|
|
gnvs->flvl = 1;
|
2015-06-09 22:42:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
unsigned long acpi_fill_madt(unsigned long current)
|
|
|
|
{
|
|
|
|
/* Local APICs */
|
|
|
|
current = acpi_create_madt_lapics(current);
|
|
|
|
|
|
|
|
/* IOAPIC */
|
|
|
|
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
|
|
|
|
2, IO_APIC_ADDR, 0);
|
|
|
|
|
2015-06-10 05:18:38 +02:00
|
|
|
return acpi_madt_irq_overrides(current);
|
2015-06-09 22:42:55 +02:00
|
|
|
}
|