Lines Matching +full:back +full:- +full:powering
1 // SPDX-License-Identifier: GPL-2.0-only
40 * @security_version_number: Used to prevent against roll back of modules.
45 * yyyy=4 digit year, mm=1-12, dd=1-31.
54 * @rsvd_next_header: 32-bit pointer to the next Secure Boot Module in the
60 …rom https://downloadcenter.intel.com/download/23197/Intel-Quark-SoC-X1000-Board-Support-Package-BSP
146 if (remaining_size - size < EFI_MIN_RESERVE) in query_variable_store_nonblocking()
181 if ((remaining_size - size < EFI_MIN_RESERVE) && in efi_query_variable_store()
225 if (remaining_size - size < EFI_MIN_RESERVE) in efi_query_variable_store()
277 mr.range.end = addr + size - 1; in efi_arch_mem_reserve()
310 * - Not within any part of the kernel
311 * - Not the BIOS reserved area (E820_TYPE_RESERVED, E820_TYPE_NVS, etc)
332 u64 start = md->phys_addr; in efi_reserve_boot_services()
333 u64 size = md->num_pages << EFI_PAGE_SHIFT; in efi_reserve_boot_services()
336 if (md->type != EFI_BOOT_SERVICES_CODE && in efi_reserve_boot_services()
337 md->type != EFI_BOOT_SERVICES_DATA) in efi_reserve_boot_services()
377 md->attribute |= EFI_MEMORY_RUNTIME; in efi_reserve_boot_services()
389 u64 pa = md->phys_addr; in efi_unmap_pages()
390 u64 va = md->virt_addr; in efi_unmap_pages()
400 if (kernel_unmap_pages_in_pgd(pgd, pa, md->num_pages)) in efi_unmap_pages()
403 if (kernel_unmap_pages_in_pgd(pgd, va, md->num_pages)) in efi_unmap_pages()
419 unsigned long long start = md->phys_addr; in efi_free_boot_services()
420 unsigned long long size = md->num_pages << EFI_PAGE_SHIFT; in efi_free_boot_services()
423 if (md->type != EFI_BOOT_SERVICES_CODE && in efi_free_boot_services()
424 md->type != EFI_BOOT_SERVICES_DATA) { in efi_free_boot_services()
430 if (md->attribute & EFI_MEMORY_RUNTIME) { in efi_free_boot_services()
443 * Nasty quirk: if all sub-1MB memory is used for boot in efi_free_boot_services()
446 * memory back to the memblock allocator, so instead in efi_free_boot_services()
451 * grub2-efi on a hard disk. (And no, I don't know why in efi_free_boot_services()
459 size -= rm_size; in efi_free_boot_services()
464 * - BIOS might clobber it in efi_free_boot_services()
465 * - Crash kernel needs it to be reserved in efi_free_boot_services()
470 size -= (SZ_1M - start); in efi_free_boot_services()
498 if (!(md->attribute & EFI_MEMORY_RUNTIME) && in efi_free_boot_services()
499 (md->type == EFI_BOOT_SERVICES_CODE || in efi_free_boot_services()
500 md->type == EFI_BOOT_SERVICES_DATA)) in efi_free_boot_services()
541 ret = -ENOMEM; in efi_reuse_config()
545 if (!data->smbios) in efi_reuse_config()
553 ret = -ENOMEM; in efi_reuse_config()
560 guid = ((efi_config_table_64_t *)p)->guid; in efi_reuse_config()
563 ((efi_config_table_64_t *)p)->table = data->smbios; in efi_reuse_config()
582 pr_info("Setup done, disabling due to 32/64-bit mismatch\n"); in efi_apply_memmap_quirks()
588 * For most modern platforms the preferred method of powering off is via
620 if (csh->csh_signature != QUARK_CSH_SIGNATURE || in qrk_capsule_setup_info()
621 csh->headersize != QUARK_SECURITY_HEADER_SIZE) in qrk_capsule_setup_info()
631 if (csh->rsvd_next_header != 0) { in qrk_capsule_setup_info()
633 return -EINVAL; in qrk_capsule_setup_info()
636 *pkbuff += csh->headersize; in qrk_capsule_setup_info()
637 cap_info->total_size = csh->headersize; in qrk_capsule_setup_info()
642 cap_info->phys[0] += csh->headersize; in qrk_capsule_setup_info()
645 * cap_info->capsule should point at a virtual mapping of the entire in qrk_capsule_setup_info()
650 * virtual mapping, let's just point cap_info->capsule at our copy in qrk_capsule_setup_info()
653 cap_info->capsule = &cap_info->header; in qrk_capsule_setup_info()
674 cap_info->total_size = 0; in efi_capsule_setup_info()
680 * - a value > 0 if the setup should continue, after advancing in efi_capsule_setup_info()
682 * - 0 if not enough hdr_bytes are available yet in efi_capsule_setup_info()
683 * - a negative error code otherwise in efi_capsule_setup_info()
685 quirk_handler = (typeof(quirk_handler))id->driver_data; in efi_capsule_setup_info()
691 memcpy(&cap_info->header, kbuff, sizeof(cap_info->header)); in efi_capsule_setup_info()
693 cap_info->total_size += cap_info->header.imagesize; in efi_capsule_setup_info()
733 * Address range 0x0000 - 0x0fff is always mapped in the efi_pgd, so in efi_crash_gracefully_on_page_fault()
762 * calling process to efi_mm. Hence, switch back to task_mm. in efi_crash_gracefully_on_page_fault()