OcBootManagementLib: Add missing explicit initialisation of mImageLoaderCaps in OcImageLoaderLoad (#496)

Fix mentioned in changelog incorporates this and the previous commit
This commit is contained in:
Mike Beaton 2023-10-30 09:30:52 +00:00 committed by GitHub
parent c6060b25bb
commit 7f08cc7c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,7 @@ OpenCore Changelog
- Updated builtin firmware versions for SMBIOS and the rest
- Fixed hang while generating boot entries on some systems
- Added `efidebug.tool` support for 32-bit on 32-bit using GDB or LLDB
- Fixed potential incorrect values in kernel image capabilities calculation
#### v0.9.5
- Fixed GUID formatting for legacy NVRAM saving

View File

@ -270,6 +270,17 @@ OcImageLoaderLoad (
OC_LOADED_IMAGE_PROTOCOL *OcLoadedImage;
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
//
// For OcImageLoaderLoad always assume target default.
//
#ifdef MDE_CPU_IA32
mImageLoaderCaps = OC_KERN_CAPABILITY_K32_U32 | OC_KERN_CAPABILITY_K32_U64;
#else
mImageLoaderCaps = OC_KERN_CAPABILITY_K64_U64;
#endif
mImageLoaderCapsHandle = NULL;
ASSERT (SourceBuffer != NULL);
//
@ -411,6 +422,8 @@ OcImageLoaderLoad (
return Status;
}
mImageLoaderCapsHandle = *ImageHandle;
DEBUG ((DEBUG_VERBOSE, "OCB: Loaded image at %p\n", *ImageHandle));
return EFI_SUCCESS;