4 * Copyright (C) 2006 Mihai Georgian <u-boot@linuxnotincluded.org.uk>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * Based on: arch/ppc/boot/sandpoint/head.S
22 * arch/ppc/kernel/head.S
23 * http://www-106.ibm.com/developerworks/library/pa-ppccache.html
26 #define HID0 0x3F0 /* Hardware Implementation Register 0 */
27 #define HID0_ICE (1<<15) /* Instruction Cache Enable */
28 #define HID0_DCE (1<<14) /* Data Cache Enable */
35 mr r31,r3 /* pa_load_uboot */
36 mr r30,r4 /* pa_uboot_buf */
37 mr r29,r5 /* load_address */
39 /* disable interrupts */
41 rlwinm r0,r0,0,17,15 /* clear MSR_EE in r0 */
49 /* jump to after_mmu_off */
50 addi r4,r31,after_mmu_off-load_uboot
60 /* copy uboot image */
61 mr r4,r29 /* load address */
62 addi r30,r30,4 /* skip size */
80 lis r1,0x100 /* put stack at 16M */
83 /* u-boot entry point is u-boot base + 0x100 */
89 li r2,1024 /* flush 16K cache */
107 ori r3,r3,HID0_ICE|HID0_DCE