diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2011-07-18 16:38:54 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2011-07-18 16:38:54 +0000 |
commit | 6464a2bd2fe2246ee489af44ac77846f5dfd6526 (patch) | |
tree | be5ba4ffda9c23b8b116445a8f1bfa8e25062175 /c | |
parent | 2011-07-18 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-6464a2bd2fe2246ee489af44ac77846f5dfd6526.tar.bz2 |
2011-07-18 Till Straumann <strauman@slac.stanford.edu>
* shared/bootloader/qemu_fakerom.S: Added work-around for
qemu bug 811683.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/bootloader/qemu_fakerom.S | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/ChangeLog index 4fed9877ab..faabc3f21a 100644 --- a/c/src/lib/libbsp/powerpc/ChangeLog +++ b/c/src/lib/libbsp/powerpc/ChangeLog @@ -1,5 +1,10 @@ 2011-07-18 Till Straumann <strauman@slac.stanford.edu> + * shared/bootloader/qemu_fakerom.S: Added work-around for + qemu bug 811683. + +2011-07-18 Till Straumann <strauman@slac.stanford.edu> + * shared/bootloader/head.S: disable USE_PPCBUG under qemu. 2011-07-18 Till Straumann <strauman@slac.stanford.edu> diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/qemu_fakerom.S b/c/src/lib/libbsp/powerpc/shared/bootloader/qemu_fakerom.S index b0b8e4d38c..7ed9739e7b 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/qemu_fakerom.S +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/qemu_fakerom.S @@ -18,6 +18,8 @@ #define PCI_MAX_DEV 32 +#define BA_OPCODE(tgt) ((18<<(31-5)) | 2 | ((tgt) & 0x03fffffc)) + .global fake_data .global res_set_memsz @@ -25,6 +27,20 @@ _start: lis 1, INIT_STACK@h ori 1,1,INIT_STACK@l + + /* qemu 0.14.1 has the wrong exception prefix for 74xx CPUs + * (bug 811683). Work around this by putting a stub at 0x00000X00 + * which simply jumps to high memory. We only need the SC exception + * for now. + */ + lis 3, BA_OPCODE(0xfff00000)@h + ori 3, 3, BA_OPCODE(0xfff00000)@l + li 4, 0x0c00 + add 3, 3, 4 + stw 3, 0(4) + dcbf 0, 4 + icbi 0, 4 + bl pci_irq_set /* copy residual to RAM and fix up; * this routine returns a pointer to |