mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
Merge pull request #292636 from RaitoBezarius/smm-works-for-something-else-than-x86-actually
OVMF: remove invalid `assert` on SMM
This commit is contained in:
commit
b6401f808a
@ -877,11 +877,9 @@ in
|
||||
type = types.package;
|
||||
default = (pkgs.OVMF.override {
|
||||
secureBoot = cfg.useSecureBoot;
|
||||
systemManagementModeRequired = cfg.useSecureBoot;
|
||||
}).fd;
|
||||
defaultText = ''(pkgs.OVMF.override {
|
||||
secureBoot = cfg.useSecureBoot;
|
||||
systemManagementModeRequired = cfg.useSecureBoot;
|
||||
}).fd'';
|
||||
description =
|
||||
lib.mdDoc "OVMF firmware package, defaults to OVMF configured with secure boot if needed.";
|
||||
@ -1185,7 +1183,7 @@ in
|
||||
"-tpmdev emulator,id=tpm_dev_0,chardev=chrtpm"
|
||||
"-device ${cfg.tpm.deviceModel},tpmdev=tpm_dev_0"
|
||||
])
|
||||
(mkIf (cfg.efi.OVMF.systemManagementModeRequired or false) [
|
||||
(mkIf (pkgs.stdenv.hostPlatform.isx86 && cfg.efi.OVMF.systemManagementModeRequired) [
|
||||
"-machine" "q35,smm=on"
|
||||
"-global" "driver=cfi.pflash01,property=secure,value=on"
|
||||
])
|
||||
|
@ -115,15 +115,17 @@ in
|
||||
virtualisation.useSecureBoot = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
testScript = let
|
||||
efiArch = pkgs.stdenv.hostPlatform.efiArch;
|
||||
in { nodes, ... }: ''
|
||||
machine.start(allow_reboot=True)
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
machine.succeed("sbctl create-keys")
|
||||
machine.succeed("sbctl enroll-keys --yes-this-might-brick-my-machine")
|
||||
machine.succeed('sbctl sign /boot/EFI/systemd/systemd-bootx64.efi')
|
||||
machine.succeed('sbctl sign /boot/EFI/BOOT/BOOTX64.EFI')
|
||||
machine.succeed('sbctl sign /boot/EFI/nixos/*bzImage.efi')
|
||||
machine.succeed('sbctl sign /boot/EFI/systemd/systemd-boot${efiArch}.efi')
|
||||
machine.succeed('sbctl sign /boot/EFI/BOOT/BOOT${toUpper efiArch}.EFI')
|
||||
machine.succeed('sbctl sign /boot/EFI/nixos/*${nodes.machine.system.boot.loader.kernelFile}.efi')
|
||||
|
||||
machine.reboot()
|
||||
|
||||
|
@ -74,7 +74,6 @@ let
|
||||
in
|
||||
|
||||
assert platformSpecific ? ${cpuName};
|
||||
assert systemManagementModeRequired -> stdenv.hostPlatform.isx86;
|
||||
assert msVarsTemplate -> fdSize4MB;
|
||||
assert msVarsTemplate -> platformSpecific.${cpuName} ? msVarsArgs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user