Commit a471e0fd authored by Alessandro Rubini's avatar Alessandro Rubini

crt0.S: include information for the dumping tool

There was a hole at the beginning of the generated binary, so this
commit includes some data to identify the endianness of the dump file
and host pointers to the important structures that we dump.
For wr-switch, the ppi pointer is just set to zero.

The change is backward compatible, because we just fill 32 bytes of
data where we had a bunch of zeroes.

The next commit will use such information when available in the dump file.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <>

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <>
parent 7918a7e2
......@@ -103,6 +103,14 @@ _reset_handler:
.size _reset_handler, .-_reset_handler
.org 0x80
/* Used by the dumping tool to identify byte ordering */
.ascii "WRPC----"
.int 0x01234567
.short 0x89ab, 0xcdef
/* Pointer to structures, for the dumping tool */
.word softpll, fifo_log, ppi_static, 0
.extern _irq_entry
.org 0xc0
.global _interrupt_handler
......@@ -84,5 +84,8 @@ SECTIONS
/* First location in stack is highest address in RAM (stack area) */
PROVIDE(_fstack = ORIGIN(stack) + LENGTH(stack) - 4);
/* We have no ppi_static in wrs builds */
PROVIDE(ppi_static = 0);
......@@ -61,7 +61,7 @@ static const struct stringlist_entry seq_states [] =
{ 0, NULL }
static volatile struct softpll_state softpll;
volatile struct softpll_state softpll;
static volatile int ptracker_mask = 0;
/* fixme: should be done by spll_init() but spll_init is called to
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment