soc/intel/ptl: Update ME specification version to 21
[coreboot.git] / src / mainboard / emulation / qemu-sbsa / acpi.c
blob1dae24277f129b45e9ab6b3c1e1d5807d2755a60
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
4 #include <mainboard/addressmap.h>
7 void acpi_fill_fadt(acpi_fadt_t *fadt)
9 fadt->ARM_boot_arch |= ACPI_FADT_ARM_PSCI_COMPLIANT;
12 unsigned long acpi_fill_madt(unsigned long current)
14 return current;
17 uintptr_t platform_get_gicd_base(void)
19 return SBSA_GIC_DIST;
22 uintptr_t platform_get_gicr_base(void)
24 return SBSA_GIC_REDIST;
27 #define SEC_EL1_TIMER_GISV 0x1d
28 #define NONSEC_EL1_TIMER_GSIV 0x1e
29 #define VIRTUAL_TIMER_GSIV 0x1b
30 #define NONSEC_EL2_TIMER_GSIV 0x1a
32 #define SBSA_TIMER_FLAGS (ACPI_GTDT_INTERRUPT_POLARITY | ACPI_GTDT_ALWAYS_ON)
34 void acpi_soc_fill_gtdt(acpi_gtdt_t *gtdt)
36 /* This value is optional if the system implements EL3 (Security
37 Extensions). If not provided, this field must be 0xFFFFFFFFFFFFFFFF. */
38 gtdt->counter_block_address = UINT64_MAX;
39 gtdt->secure_el1_interrupt = SEC_EL1_TIMER_GISV;
40 gtdt->secure_el1_flags = SBSA_TIMER_FLAGS;
41 gtdt->non_secure_el1_interrupt = NONSEC_EL1_TIMER_GSIV;
42 gtdt->non_secure_el1_flags = SBSA_TIMER_FLAGS;
43 gtdt->virtual_timer_interrupt = VIRTUAL_TIMER_GSIV;
44 gtdt->virtual_timer_flags = SBSA_TIMER_FLAGS;
45 gtdt->non_secure_el2_interrupt = NONSEC_EL2_TIMER_GSIV;
46 gtdt->non_secure_el2_flags = SBSA_TIMER_FLAGS;
47 /* This value is optional if the system implements EL3
48 (Security Extensions). If not provided, this field must be
49 0xFFFFFFFFFFFFFFF. */
50 gtdt->counter_read_block_address = UINT64_MAX;
53 #define WD_TIMER_GSIV 0x30
55 unsigned long acpi_soc_gtdt_add_timers(uint32_t *count, unsigned long current)
57 (*count)++;
58 return acpi_gtdt_add_watchdog(current, SBSA_GWDT_REFRESH, SBSA_GWDT_CONTROL,
59 WD_TIMER_GSIV, 0);