* [U-Boot-Users] [PATCH] Unlock cache on mpc824x
@ 2003-09-02 13:20 Gleb Natapov
2003-09-10 21:03 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2003-09-02 13:20 UTC (permalink / raw)
To: u-boot
Hello,
MPC824x locks way0 of the cache while booting for use as initial RAM, but
it never unlocks it. The cache remains locked even after booting Linux.
Attached patch unlocks cache after relocation to RAM and invalidates locked
entries.
--
Gleb.
-------------- next part --------------
--- u-boot/cpu/mpc824x/start.S 2003-07-25 02:39:07.000000000 +0300
+++ u-boot.p/cpu/mpc824x/start.S 2003-09-02 16:01:59.000000000 +0300
@@ -526,11 +526,26 @@
stwu r0,-4(r7)
bdnz 3b
+4:
+#if !defined(CONFIG_BMW)
+/* Unlock the data cache and invalidate locked area */
+ xor r0, r0, r0
+ mtspr 1011, r0
+ lis r4, CFG_INIT_RAM_ADDR at h
+ ori r4, r4, CFG_INIT_RAM_ADDR at l
+ li r0, 128
+ mtctr r0
+41:
+ dcbi r0, r4
+ addi r4, r4, 32
+ bdnz 41b
+#endif
+
/*
* Now flush the cache: note that we must start from a cache aligned
* address. Otherwise we might miss one cache line.
*/
-4: cmpwi r6,0
+ cmpwi r6,0
add r5,r3,r5
beq 7f /* Always flush prefetch queue in any case */
subi r0,r6,1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot-Users] [PATCH] Unlock cache on mpc824x
2003-09-02 13:20 [U-Boot-Users] [PATCH] Unlock cache on mpc824x Gleb Natapov
@ 2003-09-10 21:03 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2003-09-10 21:03 UTC (permalink / raw)
To: u-boot
Dear Gleb,
in message <20030902132002.GK10453@nbase.co.il> you wrote:
>
> MPC824x locks way0 of the cache while booting for use as initial RAM, but
> it never unlocks it. The cache remains locked even after booting Linux.
>
> Attached patch unlocks cache after relocation to RAM and invalidates locked
> entries.
Added, thanks.
Ummm... can you please start attaching CHANGELOG entries with your
patches?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
That Microsoft, the Trabant of the operating system world, may be
glancing over the Berlin Wall at the Audis and BMWs and Mercedes. In
their own universe Trabants and Ladas were mainstream too...
-- Evan Leibovitch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-10 21:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-02 13:20 [U-Boot-Users] [PATCH] Unlock cache on mpc824x Gleb Natapov
2003-09-10 21:03 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox