Lines Matching +full:hw +full:- +full:revision

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.
17 #include <linux/efi-bgrt.h>
41 return -EINVAL; in parse_acpi()
51 return -EINVAL; /* Core will print when we return error */ in parse_acpi()
58 * acpi_fadt_sanity_check() - Check FADT presence and carry out sanity
72 * and carry out revision and ACPI HW reduced compliancy tests in acpi_fadt_sanity_check()
79 return -ENODEV; in acpi_fadt_sanity_check()
85 * The revision in the table header is the FADT's Major revision. The in acpi_fadt_sanity_check()
86 * FADT also has a minor revision, which is stored in the FADT itself. in acpi_fadt_sanity_check()
89 * for HW_REDUCED flag. However, once RISC-V updates are released in in acpi_fadt_sanity_check()
90 * the ACPI spec, we need to update this check for exact minor revision in acpi_fadt_sanity_check()
92 if (table->revision < 6 || (table->revision == 6 && fadt->minor_revision < 5)) in acpi_fadt_sanity_check()
93 pr_err(FW_BUG "Unsupported FADT revision %d.%d, should be 6.5+\n", in acpi_fadt_sanity_check()
94 table->revision, fadt->minor_revision); in acpi_fadt_sanity_check()
96 if (!(fadt->flags & ACPI_FADT_HW_REDUCED)) { in acpi_fadt_sanity_check()
98 ret = -EINVAL; in acpi_fadt_sanity_check()
113 * 3. check ACPI FADT HW reduced flag
115 * We can parse ACPI boot-time tables such as MADT after
120 * - ACPI tables are initialized and sanity checks passed
121 * - acpi=force was passed in the command line and ACPI was not disabled
130 * - ACPI has been disabled explicitly (acpi=off), or in acpi_boot_table_init()
131 * - firmware has not populated ACPI ptr in EFI system table in acpi_boot_table_init()
174 if (!(rintc->flags & ACPI_MADT_ENABLED)) in acpi_parse_madt_rintc()
177 cpuid = riscv_hartid_to_cpuid(rintc->hart_id); in acpi_parse_madt_rintc()
236 u64 end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT); in acpi_os_ioremap()
238 if (phys < md->phys_addr || phys >= end) in acpi_os_ioremap()
257 switch (region->type) { in acpi_os_ioremap()
303 if (region->attribute & EFI_MEMORY_WB) in acpi_os_ioremap()
305 else if ((region->attribute & EFI_MEMORY_WC) || in acpi_os_ioremap()
306 (region->attribute & EFI_MEMORY_WT)) in acpi_os_ioremap()
317 * raw_pci_read/write - Platform-specific PCI config space access.
326 return b->ops->read(b, devfn, reg, len, val); in raw_pci_read()
336 return b->ops->write(b, devfn, reg, len, val); in raw_pci_write()