arm64: set correct length of device path end entry
PATCH 1/1 arm64: set correct length of device path end entry
The length of the Device Path End entry in the grub_linux_boot() funtcion is incorrectly set to 0. This triggers an assert failure in debug builds of Tianocore.
The correct length is 4 bytes (1 byte type, 1 byte subtype, 2 bytes length).
grub-core/loader/arm64/linux.c +1 -1
@@ -268,7 +268,7 @@ grub_linux_boot (void) mempath[1 ].header.type =GRUB_EFI_END_DEVICE_PATH_TYPE ; mempath[1 ].header.subtype =GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE ; - mempath[1 ].header.length =0 ; + mempath[1 ].header.length =4 ; b = grub_efi_system_table->boot_services; status = b->load_image (0, grub_efi_image_handle,
Go ahead.
Quoted 29 lines · Leif Lindholm
The length of the Device Path End entry in the
grub_linux_boot()funtcion is incorrectly set to 0. This triggers an assert failure in debug builds of Tianocore.The correct length is 4 bytes (1 byte type, 1 byte subtype, 2 bytes length).
Reported-by Mark Salter <[email protected]>grub-core/loader/arm64/linux.c +1
-1@@ -268,7 +268,7 @@ grub_linux_boot (void) mempath[1 ].header.type =GRUB_EFI_END_DEVICE_PATH_TYPE ; mempath[1 ].header.subtype =GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE ; - mempath[1 ].header.length =0 ; + mempath[1 ].header.length =4 ; b = grub_efi_system_table->boot_services; status = b->load_image (0, grub_efi_image_handle,_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 14 lines · Leif Lindholm
The length of the Device Path End entry in the
grub_linux_boot()funtcion is incorrectly set to 0. This triggers an assert failure in debug builds of Tianocore.The correct length is 4 bytes (1 byte type, 1 byte subtype, 2 bytes length).
Reported-by Mark Salter <[email protected]>grub-core/loader/arm64/linux.c +0
-0
grub-core/loader/arm64/linux.c grub_linux_boot (void) · line 272
Quoted 6 lines
grub-core/loader/arm64/linux.c +1
-1@@ -268,7 +268,7 @@ grub_linux_boot (void) mempath[1 ].header.type =GRUB_EFI_END_DEVICE_PATH_TYPE ; mempath[1 ].header.subtype =GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE ; - mempath[1 ].header.length =0 ; + mempath[1 ].header.length =4 ;
Could you use sizeof ?
Quoted 9 lines
grub-core/loader/arm64/linux.c +0
-0b = grub_efi_system_table->boot_services; status = b->load_image (0, grub_efi_image_handle,_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel