1 /* startup.S - Startup code for the PowerPC. */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2003,2004,2005,2007,2008 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #include <grub/symbol.h>
21 #include <grub/cpu/kernel.h>
33 . = EXT_C(start) + GRUB_KERNEL_CPU_PREFIX
36 /* to be filled by grub-mkelfimage */
39 * Leave some breathing room for the prefix.
42 . = EXT_C(start) + GRUB_KERNEL_CPU_DATA_END
48 /* Stage1 won't zero BSS for us. In other cases, why not do it again? */
49 lis 6, (__bss_start - 4)@h
50 ori 6, 6, (__bss_start - 4)@l
52 ori 7, 7, (_end - 4)@l
54 srwi 7, 7, 2 /* We store 4 bytes at a time. */
56 2: stwu 2, 4(6) /* We know r2 is already 0 from above. */
59 /* Store r5 in grub_ieee1275_entry_fn. */
60 lis 9, grub_ieee1275_entry_fn@ha
61 stw 5, grub_ieee1275_entry_fn@l(9)