Lines Matching +full:use +full:- +full:case
1 // SPDX-License-Identifier: GPL-2.0-only
3 * ARM64 Specific Low-Level ACPI Boot Support
5 * Copyright (C) 2013-2014, Linaro Ltd.
16 #include <linux/arm-smccc.h>
19 #include <linux/efi-bgrt.h>
54 return -EINVAL; in parse_acpi()
66 return -EINVAL; /* Core will print when we return error */ in parse_acpi()
122 * acpi_fadt_sanity_check() - Check FADT presence and carry out sanity
143 return -ENODEV; in acpi_fadt_sanity_check()
154 if (table->revision < 5 || in acpi_fadt_sanity_check()
155 (table->revision == 5 && fadt->minor_revision < 1)) { in acpi_fadt_sanity_check()
157 table->revision, fadt->minor_revision); in acpi_fadt_sanity_check()
159 if (!fadt->arm_boot_flags) { in acpi_fadt_sanity_check()
160 ret = -EINVAL; in acpi_fadt_sanity_check()
166 if (!(fadt->flags & ACPI_FADT_HW_REDUCED)) { in acpi_fadt_sanity_check()
168 ret = -EINVAL; in acpi_fadt_sanity_check()
187 * We can parse ACPI boot-time tables such as MADT after
192 * - ACPI tables are initialized and sanity checks passed
193 * - acpi=force was passed in the command line and ACPI was not disabled
204 * - ACPI has been disabled explicitly (acpi=off), or in acpi_boot_table_init()
205 * - the device tree is not empty (it has more than just a /chosen node, in acpi_boot_table_init()
242 ((struct acpi_table_facs *)facs)->hardware_signature; in acpi_boot_table_init()
252 * behaviour, use acpi=nospcr to disable console in ACPI SPCR in acpi_boot_table_init()
258 pr_info("Use ACPI SPCR as default console: No\n"); in acpi_boot_table_init()
260 pr_info("Use ACPI SPCR as default console: Yes\n"); in acpi_boot_table_init()
270 * Although UEFI specifies the use of Normal Write-through for in __acpi_get_writethrough_mem_attribute()
273 * purpose, emit a warning and use Normal Non-cacheable instead. in __acpi_get_writethrough_mem_attribute()
275 pr_warn_once("No MAIR allocation for EFI_MEMORY_WT; treating as Normal Non-cacheable\n"); in __acpi_get_writethrough_mem_attribute()
310 u64 end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT); in acpi_os_ioremap()
312 if (phys < md->phys_addr || phys >= end) in acpi_os_ioremap()
331 switch (region->type) { in acpi_os_ioremap()
332 case EFI_LOADER_CODE: in acpi_os_ioremap()
333 case EFI_LOADER_DATA: in acpi_os_ioremap()
334 case EFI_BOOT_SERVICES_CODE: in acpi_os_ioremap()
335 case EFI_BOOT_SERVICES_DATA: in acpi_os_ioremap()
336 case EFI_CONVENTIONAL_MEMORY: in acpi_os_ioremap()
337 case EFI_PERSISTENT_MEMORY: in acpi_os_ioremap()
346 * NOMAP attribute set: this enables the use of ACPI in acpi_os_ioremap()
349 * below. As this particular use case only requires in acpi_os_ioremap()
350 * read access, fall through to the R/O mapping case. in acpi_os_ioremap()
354 case EFI_RUNTIME_SERVICES_CODE: in acpi_os_ioremap()
362 case EFI_ACPI_MEMORY_NVS: in acpi_os_ioremap()
364 * ACPI NVS marks an area reserved for use by the in acpi_os_ioremap()
368 * as read-only. in acpi_os_ioremap()
373 case EFI_ACPI_RECLAIM_MEMORY: in acpi_os_ioremap()
378 * that memory and use it for something else. We never in acpi_os_ioremap()
380 * anyway, in which case we should use the existing in acpi_os_ioremap()
388 if (region->attribute & EFI_MEMORY_WB) in acpi_os_ioremap()
390 else if (region->attribute & EFI_MEMORY_WC) in acpi_os_ioremap()
392 else if (region->attribute & EFI_MEMORY_WT) in acpi_os_ioremap()
407 int err = -ENOENT; in apei_claim_sea()
432 * APEI NMI-like notifications are deferred to irq_work. Unless in apei_claim_sea()
433 * we interrupted irqs-masked code, we can do that now. in apei_claim_sea()
443 err = -EINPROGRESS; in apei_claim_sea()