Path: blob/master/arch/arm/boot/compressed/head-sa1100.S
29269 views
/* SPDX-License-Identifier: GPL-2.0 */1/*2* linux/arch/arm/boot/compressed/head-sa1100.S3*4* Copyright (C) 1999 Nicolas Pitre <[email protected]>5*6* SA1100 specific tweaks. This is merged into head.S by the linker.7*8*/910#include <linux/linkage.h>11#include <asm/mach-types.h>1213.section ".start", "ax"14.arch armv41516__SA1100_start:1718@ Preserve r8/r7 i.e. kernel entry values19#ifdef CONFIG_SA1100_COLLIE20mov r7, #MACH_TYPE_COLLIE21#endif22mrc p15, 0, r0, c1, c0, 0 @ read control reg23ands r0, r0, #0x0d24beq 99f2526@ Data cache might be active.27@ Be sure to flush kernel binary out of the cache,28@ whatever state it is, before it is turned off.29@ This is done by fetching through currently executed30@ memory to be sure we hit the same cache.31bic r2, pc, #0x1f32add r3, r2, #0x4000 @ 16 kb is quite enough...331: ldr r0, [r2], #3234teq r2, r335bne 1b36mcr p15, 0, r0, c7, c10, 4 @ drain WB37mcr p15, 0, r0, c7, c7, 0 @ flush I & D caches3839@ disabling MMU and caches40mrc p15, 0, r0, c1, c0, 0 @ read control reg41bic r0, r0, #0x0d @ clear WB, DC, MMU42bic r0, r0, #0x1000 @ clear Icache43mcr p15, 0, r0, c1, c0, 04499:454647