1 /* $NetBSD: entry.S,v 1.3 2007/11/05 13:41:48 nisimura Exp $ */
3 #include <powerpc/psl.h>
4 #include <powerpc/spr.h>
5 #include <powerpc/oea/bat.h>
6 #include <powerpc/oea/hid.h>
15 bne 1f /* don't invalidate the D-cache */
16 ori 8,8,HID0_DCFI /* unless it wasn't enabled */
21 lis 5, 0xfec00000@ha /* CONFIG_ADDR of PCI */
22 lis 6, 0xfee00000@ha /* CONFIG_DATA of PCI */
40 2: /* Disable D-cache */
45 3: /* Enable D-cache */
50 mtspr SPR_HID0,8 /* enable and invalidate caches */
52 mtspr SPR_HID0,11 /* enable caches */
56 /* make sure .bss gets zeroed. */
62 5: cmpw 0,8,9 /* edata & end are >= word aligned */
69 /* prepare stack at +1MB from _start. */
84 andi. 0,4,BAT_I|BAT_PP_RW
85 cmpwi 0,0,BAT_I|BAT_PP_RW
88 andis. 3,3,0xfffe0000@ha /* BAT_EPI */
93 oris 4,4,0x0001ffff@ha
109 * run(startsym, endsym, howto, bootinfo, entry)
113 mtctr 7 /* hat trick jump to entry point */
117 * reverse endian access to mimic outw/outl/inw/inl