diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-07-09 17:16:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-07-09 17:16:10 +0000 |
commit | 93180ea26a1c8a991602b7243e1e68e7f510e381 (patch) | |
tree | 45ffe3ae3ca4ed4bbad17b7700c3385b76d09f56 /c/src/lib/libbsp/powerpc/mcp750/bootloader/head.S | |
parent | Patch from Jiri Gaisler <jgais@ws.estec.esa.nl>: (diff) | |
download | rtems-93180ea26a1c8a991602b7243e1e68e7f510e381.tar.bz2 |
Patch from Eric Valette <valette@crf.canon.fr>:
- The same bug fix that was done on pc386 to prevent interrupt
from occuring (never experienced it but who knows as I have 8259
emulation :()
- Removed every compiler warning (except wrong ones and ones I can't do
anything).
- Removed any libc available code in code linked with mcp750 rtems
executbale. Unfortunately using newlib functions for linking the
bootloader does not work as the compilation options in bootloader
(-mrelocatable -fixed-r13) are not compatible with newlib options.
=> I have put any libc external reference in one single new file (lib.c)
that is linked only with the boot loader. Removing the file from
${OBJ} and using -lc crash the bootloader. Added big warning...
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mcp750/bootloader/head.S')
-rw-r--r-- | c/src/lib/libbsp/powerpc/mcp750/bootloader/head.S | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/c/src/lib/libbsp/powerpc/mcp750/bootloader/head.S b/c/src/lib/libbsp/powerpc/mcp750/bootloader/head.S index ca8f7a1a29..232232be50 100644 --- a/c/src/lib/libbsp/powerpc/mcp750/bootloader/head.S +++ b/c/src/lib/libbsp/powerpc/mcp750/bootloader/head.S @@ -28,6 +28,13 @@ #define USE_PPCBUG #undef USE_PPCBUG + +#define MONITOR_ENTER \ + mfmsr r10 ; \ + ori r10,r10,MSR_IP ; \ + mtmsr r10 ; \ + li r10,0x63 ; \ + sc START_GOT GOT_ENTRY(_GOT2_TABLE_) @@ -50,7 +57,11 @@ /* Point the stack into the PreP partition header in the x86 reserved * code area, so that simple C routines can be called. */ -start: bl 1f +start: +#ifdef USE_PPCBUG + MONITOR_ENTER +#endif + bl 1f 1: mflr r1 li r0,0 stwu r0,start-1b-0x400+0x1b0-FRAME_SIZE(r1) @@ -230,11 +241,7 @@ moved: lwz r1,stack(bd) mtspr HID0,r0 /* Provisional return to FW, works for PPCBug */ #if 0 -1: mfmsr r10 - ori r10,r10,MSR_IP - mtmsr r10 - li r10,0x63 - sc + MONITOR_ENTER #else 1: bctr #endif @@ -313,21 +320,7 @@ flush_tlb: */ sync blr -/* A few utility functions, some copied from arch/ppc/lib/string.S */ -#if 0 - .globl strnlen - .type strnlen,@function -strnlen: - addi r4,r4,1 - mtctr r4 - addi r4,r3,-1 -1: lbzu r0,1(r4) - cmpwi 0,r0,0 - bdnzf eq,1b - subf r3,r3,r4 - blr -#endif .globl codemove codemove: .type codemove,@function |