Lines Matching +full:riscv +full:- +full:v +full:- +full:spec
1 // SPDX-License-Identifier: GPL-2.0-only
3 * RISC-V Specific Low-Level ACPI Boot Support
5 * Copyright (C) 2013-2014, Linaro Ltd.
12 * Copyright (C) 2021-2023, Ventana Micro Systems Inc.
13 * Author: Sunil V L <sunilvl@ventanamicro.com>
38 return -EINVAL; in parse_acpi()
48 return -EINVAL; /* Core will print when we return error */ in parse_acpi()
55 * acpi_fadt_sanity_check() - Check FADT presence and carry out sanity
68 * FADT is required on riscv; retrieve it to check its presence in acpi_fadt_sanity_check()
76 return -ENODEV; in acpi_fadt_sanity_check()
86 * for HW_REDUCED flag. However, once RISC-V updates are released in in acpi_fadt_sanity_check()
87 * the ACPI spec, we need to update this check for exact minor revision in acpi_fadt_sanity_check()
89 if (table->revision < 6 || (table->revision == 6 && fadt->minor_revision < 5)) in acpi_fadt_sanity_check()
91 table->revision, fadt->minor_revision); in acpi_fadt_sanity_check()
93 if (!(fadt->flags & ACPI_FADT_HW_REDUCED)) { in acpi_fadt_sanity_check()
95 ret = -EINVAL; in acpi_fadt_sanity_check()
112 * We can parse ACPI boot-time tables such as MADT after
117 * - ACPI tables are initialized and sanity checks passed
118 * - acpi=force was passed in the command line and ACPI was not disabled
127 * - ACPI has been disabled explicitly (acpi=off), or in acpi_boot_table_init()
128 * - firmware has not populated ACPI ptr in EFI system table in acpi_boot_table_init()
161 if (!(rintc->flags & ACPI_MADT_ENABLED)) in acpi_parse_madt_rintc()
164 cpuid = riscv_hartid_to_cpuid(rintc->hart_id); in acpi_parse_madt_rintc()
196 return acpi_cpu_get_madt_rintc(cpu)->uid; in get_acpi_id_for_cpu()
228 u64 end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT); in acpi_os_ioremap()
230 if (phys < md->phys_addr || phys >= end) in acpi_os_ioremap()
249 switch (region->type) { in acpi_os_ioremap()
295 if (region->attribute & EFI_MEMORY_WB) in acpi_os_ioremap()
297 else if ((region->attribute & EFI_MEMORY_WC) || in acpi_os_ioremap()
298 (region->attribute & EFI_MEMORY_WT)) in acpi_os_ioremap()
311 * controller support is added in RISC-V ACPI.
327 return -1; in acpi_pci_bus_find_domain_nr()