diff options
| -rw-r--r-- | arch/arm/boot/compressed/head.S | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 6c7ccb428c07..7135820f76d4 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
| @@ -1438,7 +1438,21 @@ ENTRY(efi_stub_entry) | |||
| 1438 | 1438 | ||
| 1439 | @ Preserve return value of efi_entry() in r4 | 1439 | @ Preserve return value of efi_entry() in r4 |
| 1440 | mov r4, r0 | 1440 | mov r4, r0 |
| 1441 | bl cache_clean_flush | 1441 | |
| 1442 | @ our cache maintenance code relies on CP15 barrier instructions | ||
| 1443 | @ but since we arrived here with the MMU and caches configured | ||
| 1444 | @ by UEFI, we must check that the CP15BEN bit is set in SCTLR. | ||
| 1445 | @ Note that this bit is RAO/WI on v6 and earlier, so the ISB in | ||
| 1446 | @ the enable path will be executed on v7+ only. | ||
| 1447 | mrc p15, 0, r1, c1, c0, 0 @ read SCTLR | ||
| 1448 | tst r1, #(1 << 5) @ CP15BEN bit set? | ||
| 1449 | bne 0f | ||
| 1450 | orr r1, r1, #(1 << 5) @ CP15 barrier instructions | ||
| 1451 | mcr p15, 0, r1, c1, c0, 0 @ write SCTLR | ||
| 1452 | ARM( .inst 0xf57ff06f @ v7+ isb ) | ||
| 1453 | THUMB( isb ) | ||
| 1454 | |||
| 1455 | 0: bl cache_clean_flush | ||
| 1442 | bl cache_off | 1456 | bl cache_off |
| 1443 | 1457 | ||
| 1444 | @ Set parameters for booting zImage according to boot protocol | 1458 | @ Set parameters for booting zImage according to boot protocol |
