diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-10-26 04:37:54 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-10-26 04:37:54 +0000 |
commit | 560ba567a08f995fe5e2d24f47b504e3aca28fa6 (patch) | |
tree | 1e349f3bf8196c2597f642e78485247e47ca2c16 | |
parent | 0398c9aabc5573e28f965098a0c4f6c45dcd0f0f (diff) | |
download | gdb-560ba567a08f995fe5e2d24f47b504e3aca28fa6.zip gdb-560ba567a08f995fe5e2d24f47b504e3aca28fa6.tar.gz gdb-560ba567a08f995fe5e2d24f47b504e3aca28fa6.tar.bz2 |
Chirp fixes:
* hw_htab.c (htab_map_binary): Don't try to map the text section
when it is empty.
* emul_chirp.c (map_over_chirp_note): Default load-base to -1 not
CHIRP_LOAD_BASE.
(emul_chirp_create): Map in the interrupt table.
-rw-r--r-- | sim/ppc/ChangeLog | 9 | ||||
-rw-r--r-- | sim/ppc/emul_chirp.c | 14 | ||||
-rw-r--r-- | sim/ppc/hw_htab.c | 10 |
3 files changed, 28 insertions, 5 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index e325321..3600c79 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,12 @@ +2001-10-25 Andrew Cagney <ac131313@redhat.com> + + * emul_generic.c (OEA_MEMORY_SIZE): Increase to 4mb. + * hw_htab.c (htab_map_binary): Don't try to map the text section + when it is empty. + * emul_chirp.c (map_over_chirp_note): Default load-base to -1 not + CHIRP_LOAD_BASE. + (emul_chirp_create): Map in the interrupt table. + 2001-07-16 Daniel Jacobowitz <drow@mvista.com> * Makefile.in: Add dependencies on $(CPU_H). diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c index c9bb89c..c4deb18 100644 --- a/sim/ppc/emul_chirp.c +++ b/sim/ppc/emul_chirp.c @@ -1537,7 +1537,7 @@ map_over_chirp_note(bfd *image, if (head.descsz == sizeof(note->desc)) note->desc.load_base = bfd_get_32(image, (void*)¬e->desc.load_base); else - note->desc.load_base = CHIRP_LOAD_BASE; + note->desc.load_base = (signed32)-1; } } @@ -1904,6 +1904,18 @@ emul_chirp_create(device *root, tree_parse(node, "./pp %d", 0x2); } + /* map in the interrupt vectors */ + + if (!chirp->real_mode) { + node = tree_parse(root, "/openprom/init/htab/pte@0x0"); + tree_parse(node, "./psim,description \"map in interrupt vectors"); + tree_parse(node, "./virtual-address 0x0"); + tree_parse(node, "./real-address 0x0"); + tree_parse(node, "./nr-bytes 0x3000"); + tree_parse(node, "./wimg %d", 0x7); + tree_parse(node, "./pp %d", 0x2); + } + return chirp; } diff --git a/sim/ppc/hw_htab.c b/sim/ppc/hw_htab.c index 35aa571..50a7b6a 100644 --- a/sim/ppc/hw_htab.c +++ b/sim/ppc/hw_htab.c @@ -571,10 +571,12 @@ htab_map_binary(device *me, } /* set up virtual memory maps for each of the regions */ - htab_map_region(me, memory, sizes.text_ra, sizes.text_base, - sizes.text_bound - sizes.text_base, - wimg, pp, - htaborg, htabmask); + if (sizes.text_bound - sizes.text_base > 0) { + htab_map_region(me, memory, sizes.text_ra, sizes.text_base, + sizes.text_bound - sizes.text_base, + wimg, pp, + htaborg, htabmask); + } htab_map_region(me, memory, sizes.data_ra, sizes.data_base, sizes.data_bound - sizes.data_base, |