File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
openhcl/underhill_core/src Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -2005,14 +2005,25 @@ async fn new_underhill_vm(
2005
2005
use vmm_core:: emuplat:: hcl_compat_uefi_nvram_storage:: VmgsStorageBackendAdapter ;
2006
2006
2007
2007
// map the GET's template enum onto the hardcoded secureboot template type
2008
- // TODO: will need to update this code for underhill on ARM
2009
2008
let base_vars = match dps. general . secure_boot_template {
2010
2009
SecureBootTemplateType :: None => CustomVars :: default ( ) ,
2011
2010
SecureBootTemplateType :: MicrosoftWindows => {
2012
- hyperv_secure_boot_templates:: x64:: microsoft_windows ( )
2011
+ if cfg ! ( guest_arch = "x86_64" ) {
2012
+ hyperv_secure_boot_templates:: x64:: microsoft_windows ( )
2013
+ } else if cfg ! ( guest_arch = "aarch64" ) {
2014
+ hyperv_secure_boot_templates:: aarch64:: microsoft_windows ( )
2015
+ } else {
2016
+ anyhow:: bail!( "no secure boot template for current guest_arch" )
2017
+ }
2013
2018
}
2014
2019
SecureBootTemplateType :: MicrosoftUefiCertificateAuthority => {
2015
- hyperv_secure_boot_templates:: x64:: microsoft_uefi_ca ( )
2020
+ if cfg ! ( guest_arch = "x86_64" ) {
2021
+ hyperv_secure_boot_templates:: x64:: microsoft_uefi_ca ( )
2022
+ } else if cfg ! ( guest_arch = "aarch64" ) {
2023
+ hyperv_secure_boot_templates:: aarch64:: microsoft_uefi_ca ( )
2024
+ } else {
2025
+ anyhow:: bail!( "no secure boot template for current guest_arch" )
2026
+ }
2016
2027
}
2017
2028
} ;
2018
2029
You can’t perform that action at this time.
0 commit comments