Skip to content

Commit 1902331

Browse files
dvhartardbiesheuvel
authored andcommitted
arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines
Commit 550b33c ("arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines") identifies the Altra family via the family field in the type#1 SMBIOS record. eMAG and Altra Max machines are similarly affected but not detected with the strict strcmp test. The type1_family smbios string is not an entirely reliable means of identifying systems with this issue as OEMs can, and do, use their own strings for these fields. However, until we have a better solution, capture the bulk of these systems by adding strcmp matching for "eMAG" and "Altra Max". Fixes: 550b33c ("arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines") Cc: <[email protected]> # 6.1.x Cc: Alexandru Elisei <[email protected]> Signed-off-by: Darren Hart <[email protected]> Tested-by: Justin He <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 966d47e commit 1902331

File tree

1 file changed

+6
-3
lines changed
  • drivers/firmware/efi/libstub

1 file changed

+6
-3
lines changed

drivers/firmware/efi/libstub/arm64.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ static bool system_needs_vamap(void)
1919
const u8 *type1_family = efi_get_smbios_string(1, family);
2020

2121
/*
22-
* Ampere Altra machines crash in SetTime() if SetVirtualAddressMap()
23-
* has not been called prior.
22+
* Ampere eMAG, Altra, and Altra Max machines crash in SetTime() if
23+
* SetVirtualAddressMap() has not been called prior.
2424
*/
25-
if (!type1_family || strcmp(type1_family, "Altra"))
25+
if (!type1_family || (
26+
strcmp(type1_family, "eMAG") &&
27+
strcmp(type1_family, "Altra") &&
28+
strcmp(type1_family, "Altra Max")))
2629
return false;
2730

2831
efi_warn("Working around broken SetVirtualAddressMap()\n");

0 commit comments

Comments
 (0)