1 /* SPDX-License-Identifier: GPL-2.0-only */
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
)
17 uintptr_t platform_get_gicd_base(void)
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
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
)
58 return acpi_gtdt_add_watchdog(current
, SBSA_GWDT_REFRESH
, SBSA_GWDT_CONTROL
,