Skip to content
Snippets Groups Projects
Commit 8faefadb authored by Marc Dietrich's avatar Marc Dietrich Committed by Tom Rini
Browse files

disk: fix unaligned access in efi partitions


start_sect is not aligned to a 4 byte boundary thus causing exceptions
on ARM platforms. Access this field via the get_unaligned_le32 macro.

Signed-off-by: default avatarMarc Dietrich <marvin24@gmx.de>
parent 795659dc
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@
*
* This limits the maximum size of addressable storage to < 2 Terra Bytes
*/
#include <asm/unaligned.h>
#include <common.h>
#include <command.h>
#include <ide.h>
......@@ -505,7 +506,7 @@ err:
static int pmbr_part_valid(struct partition *part)
{
if (part->sys_ind == EFI_PMBR_OSTYPE_EFI_GPT &&
le32_to_cpu(part->start_sect) == 1UL) {
get_unaligned_le32(&part->start_sect) == 1UL) {
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment