mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
* boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements which initialized BAT registers. * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN, grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON): Move from here... * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN, grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON): ... to here. * kern/powerpc/ieee1275/openfw.c (grub_map): New function. (grub_mapclaim): Likewise. * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by hand.
This commit is contained in:
1 parent
9304c1f804
commit
a5477a5930
6 files changed
+95
-43
No files matched your search
@@ -55,7 +55,6 @@ cmain (uint32_t r3, uint32_t r4 __attribute__((unused)), uint32_t r5)
|
||||
char **argv, args[256];
|
||||
grub_ieee1275_phandle_t chosen;
|
||||
int argc = 0, actual;
|
||||
long batl, batu;
|
||||
|
||||
if (r5 == 0xdeadbeef)
|
||||
{
|
||||
@@ -81,27 +80,6 @@ cmain (uint32_t r3, uint32_t r4 __attribute__((unused)), uint32_t r5)
|
||||
grub_ieee1275_entry_fn = (intptr_t (*)(void *)) r5;
|
||||
}
|
||||
|
||||
/* Initialize BAT registers to unmapped to not generate overlapping
|
||||
mappings below. */
|
||||
asm volatile ("mtibatu 0,%0" :: "r"(0));
|
||||
asm volatile ("mtibatu 1,%0" :: "r"(0));
|
||||
asm volatile ("mtibatu 2,%0" :: "r"(0));
|
||||
asm volatile ("mtibatu 3,%0" :: "r"(0));
|
||||
asm volatile ("mtdbatu 0,%0" :: "r"(0));
|
||||
asm volatile ("mtdbatu 1,%0" :: "r"(0));
|
||||
asm volatile ("mtdbatu 2,%0" :: "r"(0));
|
||||
asm volatile ("mtdbatu 3,%0" :: "r"(0));
|
||||
|
||||
/* Set up initial BAT table to only map the lowest 256 MB area. */
|
||||
batl = 0x00000000 | 0x10 | 0x02;
|
||||
batu = 0x00000000 | 0x1ffc | 0x02;
|
||||
|
||||
/* IBAT0 used for initial 256 MB segment */
|
||||
asm volatile ("mtibatl 3,%0; mtibatu 3,%1" :: "r" (batl), "r" (batu));
|
||||
/* DBAT0 used similar */
|
||||
asm volatile ("mtdbatl 3,%0; mtdbatu 3,%1" :: "r" (batl), "r" (batu));
|
||||
asm ("isync");
|
||||
|
||||
/* If any argument was passed to the kernel (us), they are
|
||||
put in the bootargs property of /chosen. The string can
|
||||
be null (just the nul-character), so check that the size
|
||||
|
||||
Reference in new issue
Block a user