|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1 |
|
| #
bbc45785 |
| 01-Feb-2025 |
Ard Biesheuvel <[email protected]> |
efi: Use BIT_ULL() constants for memory attributes
For legibility, use the existing BIT_ULL() to generate the u64 type EFI memory attribute macros.
Signed-off-by: Ard Biesheuvel <[email protected]>
|
| #
ba69e075 |
| 01-Feb-2025 |
Ard Biesheuvel <[email protected]> |
efi: Avoid cold plugged memory for placing the kernel
UEFI 2.11 introduced EFI_MEMORY_HOT_PLUGGABLE to annotate system memory regions that are 'cold plugged' at boot, i.e., hot pluggable memory that
efi: Avoid cold plugged memory for placing the kernel
UEFI 2.11 introduced EFI_MEMORY_HOT_PLUGGABLE to annotate system memory regions that are 'cold plugged' at boot, i.e., hot pluggable memory that is available from early boot, and described as system RAM by the firmware.
Existing loaders and EFI applications running in the boot context will happily use this memory for allocating data structures that cannot be freed or moved at runtime, and this prevents the memory from being unplugged. Going forward, the new EFI_MEMORY_HOT_PLUGGABLE attribute should be tested, and memory annotated as such should be avoided for such allocations.
In the EFI stub, there are a couple of occurrences where, instead of the high-level AllocatePages() UEFI boot service, a low-level code sequence is used that traverses the EFI memory map and carves out the requested number of pages from a free region. This is needed, e.g., for allocating as low as possible, or for allocating pages at random.
While AllocatePages() should presumably avoid special purpose memory and cold plugged regions, this manual approach needs to incorporate this logic itself, in order to prevent the kernel itself from ending up in a hot unpluggable region, preventing it from being unplugged.
So add the EFI_MEMORY_HOTPLUGGABLE macro definition, and check for it where appropriate.
Cc: [email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4 |
|
| #
144d52dd |
| 19-Dec-2024 |
Ard Biesheuvel <[email protected]> |
x86/efistub: Drop long obsolete UGA support
UGA is the EFI graphical output protocol that preceded GOP, and has been long obsolete. Drop support for it from the x86 implementation of the EFI stub -
x86/efistub: Drop long obsolete UGA support
UGA is the EFI graphical output protocol that preceded GOP, and has been long obsolete. Drop support for it from the x86 implementation of the EFI stub - other architectures never bothered to implement it (save for ia64)
Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12 |
|
| #
7eb4e1dd |
| 12-Nov-2024 |
Nicolas Saenz Julienne <[email protected]> |
x86/efi: Drop support for the EFI_PROPERTIES_TABLE
Drop support for the EFI_PROPERTIES_TABLE. It was a failed, short-lived experiment that broke the boot both on Linux and Windows, and was replaced
x86/efi: Drop support for the EFI_PROPERTIES_TABLE
Drop support for the EFI_PROPERTIES_TABLE. It was a failed, short-lived experiment that broke the boot both on Linux and Windows, and was replaced by the EFI_MEMORY_ATTRIBUTES_TABLE shortly after.
Suggested-by: Ard Biesheuvel <[email protected]> Signed-off-by: Nicolas Saenz Julienne <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3 |
|
| #
21b91d40 |
| 08-Aug-2024 |
Yue Haibing <[email protected]> |
efi: Remove unused declaration efi_initialize_iomem_resources()
Since commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"), this is not used anymore.
Signed-off-by: Yue Haibing <yuehai
efi: Remove unused declaration efi_initialize_iomem_resources()
Since commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"), this is not used anymore.
Signed-off-by: Yue Haibing <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc2, v6.11-rc1, v6.10 |
|
| #
4a2ebb08 |
| 11-Jul-2024 |
Kees Cook <[email protected]> |
efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array
While efi_memory_attributes_table_t::entry isn't used directly as an array, it is used as a base for pointer arithmetic.
efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array
While efi_memory_attributes_table_t::entry isn't used directly as an array, it is used as a base for pointer arithmetic. The type is wrong as it's not technically an array of efi_memory_desc_t's; they could be larger. Regardless, leave the type unchanged and remove the old style "0" array size. Additionally replace the open-coded entry offset code with the existing efi_memdesc_ptr() helper.
Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
887c4cf5 |
| 11-Jul-2024 |
Kees Cook <[email protected]> |
efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
The "early" part of the helper's name isn't accurate[1]. Drop it in preparation for adding a new (not early) usage.
Suggested-by: Ard Bieshe
efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
The "early" part of the helper's name isn't accurate[1]. Drop it in preparation for adding a new (not early) usage.
Suggested-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/lkml/CAMj1kXEyDjH0uu3Z4eBesV3PEnKGi5ArXXMp7R-hn8HdRytiPg@mail.gmail.com [1] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc7, v6.10-rc6 |
|
| #
71e49ecc |
| 30-Jun-2024 |
Aditya Garg <[email protected]> |
x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs
0c18184de990 ("platform/x86: apple-gmux: support MMIO gmux on T2 Macs") brought support for T2 Macs in apple-gmux. But in order to use
x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs
0c18184de990 ("platform/x86: apple-gmux: support MMIO gmux on T2 Macs") brought support for T2 Macs in apple-gmux. But in order to use dual GPU, the integrated GPU has to be enabled. On such dual GPU EFI Macs, the EFI stub needs to report that it is booting macOS in order to prevent the firmware from disabling the iGPU.
This patch is also applicable for some non T2 Intel Macs.
Based on this patch for GRUB by Andreas Heider <[email protected]>: https://lists.gnu.org/archive/html/grub-devel/2013-12/msg00442.html
Credits also goto Kerem Karabay <[email protected]> for helping porting the patch to the Linux kernel.
Cc: Orlando Chamberlain <[email protected]> Signed-off-by: Aditya Garg <[email protected]> [ardb: limit scope using list of DMI matches provided by Lukas and Orlando] Reviewed-by: Lukas Wunner <[email protected]> Tested-by: Aditya Garg <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
cd619387 |
| 01-Jul-2024 |
Ard Biesheuvel <[email protected]> |
x86/efistub: Enable SMBIOS protocol handling for x86
The smbios.c source file is not currently included in the x86 build, and before we can do so, it needs some tweaks to build correctly in combinat
x86/efistub: Enable SMBIOS protocol handling for x86
The smbios.c source file is not currently included in the x86 build, and before we can do so, it needs some tweaks to build correctly in combination with the EFI mixed mode support.
Reviewed-by: Lukas Wunner <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2 |
|
| #
cda30c65 |
| 28-Mar-2024 |
Tim Schumacher <[email protected]> |
efi: Clear up misconceptions about a maximum variable name size
The UEFI specification does not make any mention of a maximum variable name size, so the headers and implementation shouldn't claim th
efi: Clear up misconceptions about a maximum variable name size
The UEFI specification does not make any mention of a maximum variable name size, so the headers and implementation shouldn't claim that one exists either.
Comments referring to this limit have been removed or rewritten, as this is an implementation detail local to the Linux kernel.
Where appropriate, the magic value of 1024 has been replaced with EFI_VAR_NAME_LEN, as this is used for the efi_variable struct definition. This in itself does not change any behavior, but should serve as points of interest when making future changes in the same area.
A related build-time check has been added to ensure that the special 512 byte sized buffer will not overflow with a potentially decreased EFI_VAR_NAME_LEN.
Signed-off-by: Tim Schumacher <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5 |
|
| #
d228814b |
| 15-Feb-2024 |
Kuppuswamy Sathyanarayanan <[email protected]> |
efi/libstub: Add get_event_log() support for CC platforms
To allow event log info access after boot, EFI boot stub extracts the event log information and installs it in an EFI configuration table. C
efi/libstub: Add get_event_log() support for CC platforms
To allow event log info access after boot, EFI boot stub extracts the event log information and installs it in an EFI configuration table. Currently, EFI boot stub only supports installation of event log only for TPM 1.2 and TPM 2.0 protocols. Extend the same support for CC protocol. Since CC platform also uses TCG2 format, reuse TPM2 support code as much as possible.
Link: https://uefi.org/specs/UEFI/2.10/38_Confidential_Computing.html#efi-cc-measurement-protocol [1] Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lkml.kernel.org/r/0229a87e-fb19-4dad-99fc-4afd7ed4099a%40collabora.com [ardb: Split out final events table handling to avoid version confusion] Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
0bbe5b0e |
| 15-Feb-2024 |
Kuppuswamy Sathyanarayanan <[email protected]> |
efi/libstub: Add Confidential Computing (CC) measurement typedefs
If the virtual firmware implements TPM support, TCG2 protocol will be used for kernel measurements and event logging support. But in
efi/libstub: Add Confidential Computing (CC) measurement typedefs
If the virtual firmware implements TPM support, TCG2 protocol will be used for kernel measurements and event logging support. But in CC environment, not all platforms support or enable the TPM feature. UEFI specification [1] exposes protocol and interfaces used for kernel measurements in CC platforms without TPM support.
More details about the EFI CC measurements and logging can be found in [1].
Link: https://uefi.org/specs/UEFI/2.10/38_Confidential_Computing.html#efi-cc-measurement-protocol [1] Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> [ardb: Drop code changes, keep typedefs and #define's only] Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
7a1381e8 |
| 07-Mar-2024 |
Ard Biesheuvel <[email protected]> |
efi/tpm: Use symbolic GUID name from spec for final events table
The LINUX_EFI_ GUID identifiers are only intended to be used to refer to GUIDs that are part of the Linux implementation, and are not
efi/tpm: Use symbolic GUID name from spec for final events table
The LINUX_EFI_ GUID identifiers are only intended to be used to refer to GUIDs that are part of the Linux implementation, and are not considered external ABI. (Famous last words).
GUIDs that already have a symbolic name in the spec should use that name, to avoid confusion between firmware components. So use the official name EFI_TCG2_FINAL_EVENTS_TABLE_GUID for the TCG2 'final events' configuration table.
Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
4602e575 |
| 15-Feb-2024 |
Ryan Roberts <[email protected]> |
arm64/mm: wire up PTE_CONT for user mappings
With the ptep API sufficiently refactored, we can now introduce a new "contpte" API layer, which transparently manages the PTE_CONT bit for user mappings
arm64/mm: wire up PTE_CONT for user mappings
With the ptep API sufficiently refactored, we can now introduce a new "contpte" API layer, which transparently manages the PTE_CONT bit for user mappings.
In this initial implementation, only suitable batches of PTEs, set via set_ptes(), are mapped with the PTE_CONT bit. Any subsequent modification of individual PTEs will cause an "unfold" operation to repaint the contpte block as individual PTEs before performing the requested operation. While, a modification of a single PTE could cause the block of PTEs to which it belongs to become eligible for "folding" into a contpte entry, "folding" is not performed in this initial implementation due to the costs of checking the requirements are met. Due to this, contpte mappings will degrade back to normal pte mappings over time if/when protections are changed. This will be solved in a future patch.
Since a contpte block only has a single access and dirty bit, the semantic here changes slightly; when getting a pte (e.g. ptep_get()) that is part of a contpte mapping, the access and dirty information are pulled from the block (so all ptes in the block return the same access/dirty info). When changing the access/dirty info on a pte (e.g. ptep_set_access_flags()) that is part of a contpte mapping, this change will affect the whole contpte block. This is works fine in practice since we guarantee that only a single folio is mapped by a contpte block, and the core-mm tracks access/dirty information per folio.
In order for the public functions, which used to be pure inline, to continue to be callable by modules, export all the contpte_* symbols that are now called by those public inline functions.
The feature is enabled/disabled with the ARM64_CONTPTE Kconfig parameter at build time. It defaults to enabled as long as its dependency, TRANSPARENT_HUGEPAGE is also enabled. The core-mm depends upon TRANSPARENT_HUGEPAGE to be able to allocate large folios, so if its not enabled, then there is no chance of meeting the physical contiguity requirement for contpte mappings.
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ryan Roberts <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Tested-by: John Hubbard <[email protected]> Acked-by: Mark Rutland <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Barry Song <[email protected]> Cc: Borislav Petkov (AMD) <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Morse <[email protected]> Cc: Kefeng Wang <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Cc: Yang Shi <[email protected]> Cc: Zi Yan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1 |
|
| #
94f7f618 |
| 07-Nov-2023 |
Masahisa Kojima <[email protected]> |
efivarfs: automatically update super block flag
efivar operation is updated when the tee_stmm_efi module is probed. tee_stmm_efi module supports SetVariable runtime service, but user needs to manual
efivarfs: automatically update super block flag
efivar operation is updated when the tee_stmm_efi module is probed. tee_stmm_efi module supports SetVariable runtime service, but user needs to manually remount the efivarfs as RW to enable the write access if the previous efivar operation does not support SetVariable and efivarfs is mounted as read-only.
This commit notifies the update of efivar operation to efivarfs subsystem, then drops SB_RDONLY flag if the efivar operation supports SetVariable.
Signed-off-by: Masahisa Kojima <[email protected]> [ardb: use per-superblock instance of the notifier block] Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
1f71f37f |
| 07-Nov-2023 |
Masahisa Kojima <[email protected]> |
efi: Add EFI_ACCESS_DENIED status code
This commit adds the EFI_ACCESS_DENIED status code.
Acked-by: Sumit Garg <[email protected]> Co-developed-by: Ilias Apalodimas <[email protected]
efi: Add EFI_ACCESS_DENIED status code
This commit adds the EFI_ACCESS_DENIED status code.
Acked-by: Sumit Garg <[email protected]> Co-developed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]> Signed-off-by: Masahisa Kojima <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
6bb3703a |
| 07-Nov-2023 |
Masahisa Kojima <[email protected]> |
efi: expose efivar generic ops register function
This is a preparation for supporting efivar operations provided by other than efi subsystem. Both register and unregister functions are exposed so t
efi: expose efivar generic ops register function
This is a preparation for supporting efivar operations provided by other than efi subsystem. Both register and unregister functions are exposed so that non-efi subsystem can revert the efi generic operation.
Acked-by: Sumit Garg <[email protected]> Co-developed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]> Signed-off-by: Masahisa Kojima <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
|
Revision tags: v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2 |
|
| #
cf8e8658 |
| 20-Oct-2022 |
Ard Biesheuvel <[email protected]> |
arch: Remove Itanium (IA-64) architecture
The Itanium architecture is obsolete, and an informal survey [0] reveals that any residual use of Itanium hardware in production is mostly HP-UX or OpenVMS
arch: Remove Itanium (IA-64) architecture
The Itanium architecture is obsolete, and an informal survey [0] reveals that any residual use of Itanium hardware in production is mostly HP-UX or OpenVMS based. The use of Linux on Itanium appears to be limited to enthusiasts that occasionally boot a fresh Linux kernel to see whether things are still working as intended, and perhaps to churn out some distro packages that are rarely used in practice.
None of the original companies behind Itanium still produce or support any hardware or software for the architecture, and it is listed as 'Orphaned' in the MAINTAINERS file, as apparently, none of the engineers that contributed on behalf of those companies (nor anyone else, for that matter) have been willing to support or maintain the architecture upstream or even be responsible for applying the odd fix. The Intel firmware team removed all IA-64 support from the Tianocore/EDK2 reference implementation of EFI in 2018. (Itanium is the original architecture for which EFI was developed, and the way Linux supports it deviates significantly from other architectures.) Some distros, such as Debian and Gentoo, still maintain [unofficial] ia64 ports, but many have dropped support years ago.
While the argument is being made [1] that there is a 'for the common good' angle to being able to build and run existing projects such as the Grid Community Toolkit [2] on Itanium for interoperability testing, the fact remains that none of those projects are known to be deployed on Linux/ia64, and very few people actually have access to such a system in the first place. Even if there were ways imaginable in which Linux/ia64 could be put to good use today, what matters is whether anyone is actually doing that, and this does not appear to be the case.
There are no emulators widely available, and so boot testing Itanium is generally infeasible for ordinary contributors. GCC still supports IA-64 but its compile farm [3] no longer has any IA-64 machines. GLIBC would like to get rid of IA-64 [4] too because it would permit some overdue code cleanups. In summary, the benefits to the ecosystem of having IA-64 be part of it are mostly theoretical, whereas the maintenance overhead of keeping it supported is real.
So let's rip off the band aid, and remove the IA-64 arch code entirely. This follows the timeline proposed by the Debian/ia64 maintainer [5], which removes support in a controlled manner, leaving IA-64 in a known good state in the most recent LTS release. Other projects will follow once the kernel support is removed.
[0] https://lore.kernel.org/all/CAMj1kXFCMh_578jniKpUtx_j8ByHnt=s7S+yQ+vGbKt9ud7+kQ@mail.gmail.com/ [1] https://lore.kernel.org/all/[email protected]/ [2] https://gridcf.org/gct-docs/latest/index.html [3] https://cfarm.tetaneutral.net/machines/list/ [4] https://lore.kernel.org/all/[email protected]/ [5] https://lore.kernel.org/all/ff58a3e76e5102c94bb5946d99187b358def688a.camel@physik.fu-berlin.de/
Acked-by: Tony Luck <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
5894cf57 |
| 02-Jul-2023 |
Ard Biesheuvel <[email protected]> |
acpi/prmt: Use EFI runtime sandbox to invoke PRM handlers
Instead of bypassing the kernel's adaptation layer for performing EFI runtime calls, wire up ACPI PRM handling into it. This means these cal
acpi/prmt: Use EFI runtime sandbox to invoke PRM handlers
Instead of bypassing the kernel's adaptation layer for performing EFI runtime calls, wire up ACPI PRM handling into it. This means these calls can no longer occur concurrently with EFI runtime calls, and will be made from the EFI runtime workqueue. It also means any page faults occurring during PRM handling will be identified correctly as originating in firmware code.
Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
3c17ae41 |
| 08-Aug-2023 |
Ard Biesheuvel <[email protected]> |
efi/runtime-wrappers: Don't duplicate setup/teardown code
Avoid duplicating the EFI arch setup and teardown routine calls numerous times in efi_call_rts(). Instead, expand the efi_call_virt_pointer(
efi/runtime-wrappers: Don't duplicate setup/teardown code
Avoid duplicating the EFI arch setup and teardown routine calls numerous times in efi_call_rts(). Instead, expand the efi_call_virt_pointer() macro into efi_call_rts(), taking the pre and post parts out of the switch.
Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
e38abdab |
| 02-Jul-2023 |
Ard Biesheuvel <[email protected]> |
efi/runtime-wrappers: Remove duplicated macro for service returning void
__efi_call_virt() exists as an alternative for efi_call_virt() for the sole reason that ResetSystem() returns void, and so we
efi/runtime-wrappers: Remove duplicated macro for service returning void
__efi_call_virt() exists as an alternative for efi_call_virt() for the sole reason that ResetSystem() returns void, and so we cannot use a call to it in the RHS of an assignment.
Given that there is only a single user, let's drop the macro, and expand it into the caller. That way, the remaining macro can be tightened somewhat in terms of type safety too.
Note that the use of typeof() on the runtime service invocation does not result in an actual call being made, but it does require a few pointer types to be fixed up and converted into the proper function pointer prototypes.
Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
c7c7bce0 |
| 02-Jul-2023 |
Ard Biesheuvel <[email protected]> |
efi/runtime-wrappers: Use type safe encapsulation of call arguments
The current code that marshalls the EFI runtime call arguments to hand them off to a async helper does so in a type unsafe and sli
efi/runtime-wrappers: Use type safe encapsulation of call arguments
The current code that marshalls the EFI runtime call arguments to hand them off to a async helper does so in a type unsafe and slightly messy manner - everything is cast to void* except for some integral types that are passed by reference and dereferenced on the receiver end.
Let's clean this up a bit, and record the arguments of each runtime service invocation exactly as they are issued, in a manner that permits the compiler to check the types of the arguments at both ends.
Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
8a132ecb |
| 25-Jul-2023 |
YueHaibing <[email protected]> |
efi: Remove unused extern declaration efi_lookup_mapped_addr()
Since commit 50a0cb565246 ("x86/efi-bgrt: Fix kernel panic when mapping BGRT data") this extern declaration is not used anymore.
Signe
efi: Remove unused extern declaration efi_lookup_mapped_addr()
Since commit 50a0cb565246 ("x86/efi-bgrt: Fix kernel panic when mapping BGRT data") this extern declaration is not used anymore.
Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
show more ...
|
| #
8b0d1354 |
| 06-Jul-2023 |
Thomas Zimmermann <[email protected]> |
efi: Do not include <linux/screen_info.h> from EFI header
The header file <linux/efi.h> does not need anything from <linux/screen_info.h>. Declare struct screen_info and remove the include statement
efi: Do not include <linux/screen_info.h> from EFI header
The header file <linux/efi.h> does not need anything from <linux/screen_info.h>. Declare struct screen_info and remove the include statements. Update a number of source files that require struct screen_info's definition.
v2: * update loongarch (Jingfeng)
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Russell King <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
c0461bd1 |
| 06-Jun-2023 |
Dionna Glaze <[email protected]> |
x86/efi: Safely enable unaccepted memory in UEFI
The UEFI v2.9 specification includes a new memory type to be used in environments where the OS must accept memory that is provided from its host. Bef
x86/efi: Safely enable unaccepted memory in UEFI
The UEFI v2.9 specification includes a new memory type to be used in environments where the OS must accept memory that is provided from its host. Before the introduction of this memory type, all memory was accepted eagerly in the firmware. In order for the firmware to safely stop accepting memory on the OS's behalf, the OS must affirmatively indicate support to the firmware. This is only a problem for AMD SEV-SNP, since Linux has had support for it since 5.19. The other technology that can make use of unaccepted memory, Intel TDX, does not yet have Linux support, so it can strictly require unaccepted memory support as a dependency of CONFIG_TDX and not require communication with the firmware.
Enabling unaccepted memory requires calling a 0-argument enablement protocol before ExitBootServices. This call is only made if the kernel is compiled with UNACCEPTED_MEMORY=y
This protocol will be removed after the end of life of the first LTS that includes it, in order to give firmware implementations an expiration date for it. When the protocol is removed, firmware will strictly infer that a SEV-SNP VM is running an OS that supports the unaccepted memory type. At the earliest convenience, when unaccepted memory support is added to Linux, SEV-SNP may take strict dependence in it. After the firmware removes support for the protocol, this should be reverted.
[tl: address some checkscript warnings]
Signed-off-by: Dionna Glaze <[email protected]> Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/0d5f3d9a20b5cf361945b7ab1263c36586a78a42.1686063086.git.thomas.lendacky@amd.com
show more ...
|