This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Running a bare board executable under PSIM


Hi,

I am trying to execute a program designed to run on a custom PPC603e
board with no OS and no monitor under PSIM but am running into a snag.
Part of my system reset exception handler copies initialized data from
what will normally be Flash PROM into what will normally be SRAM.  The
ELF version of this program has initialized data already at the correct
(RAM) location (as is expected) so loading that file into the simulator
doesn't seem to be the right thing to do.  The S-Record version of this
program has the initialized data in the correct (Flash PROM) location
but when I load and then try to run this program, it dies immediately
with the following error:

/openprom/init/stack: Unfinished procedure create_ppc_aix_stack_frame

My device tree (shown below) does not include this node.  Is that a
problem?  Note that I do have the stack defined under /openprom/vm and
that definitely works since I accidentally initialized the stack pointer
to 0xF0000 instead of 0x100000 in the code and got some errors in PSIM
as a result (a _very_ cool feature).

/openprom/init/register/msr 0x40
/openprom/init/register/sp 0x100000
/openprom/trace/dump-device-tree 0x0
/openprom/options/env "operating"
/openprom/options/model "603e"
/openprom/options/oea-interrupt-prefix 0x1
/openprom/vm/stack-base 0xf0000
/openprom/vm/nr-bytes 0x10000

Note also that I have tried adding memory regions for SRAM and Flash
PROM respectively (which aren't contiguous) to the device tree (see
below) thinking that that might help but it doesn't seem to change
anything.

/openprom/memory@0 0 0x100000
/openprom/memory@fff00000 0xfff00000 0x100000

I wasn't sure if that first memory region should overlap the stack or
not so I also tried the following:

/openprom/memory@0 0 0xf0000

Does anyone have any guidelines that I could follow to do the right
thing in order to run a bare board executable under PSIM?

Also, when I dumped the device tree, I found that the default emulation
is set to netbsd.  Is this really appropriate for a bare board
executable?  It seems that all emulation choices have some level of
monitor or OS support.  I don't really understand if this is good, bad,
or indifferent.

Thanks for the help!

Ron McCall


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]