Message ID | 1315897821-23049-13-git-send-email-monstr@monstr.eu |
---|---|
State | Rejected |
Headers | show |
On Tuesday, September 13, 2011 03:10:07 Michal Simek wrote: > --- a/arch/microblaze/include/asm/processor.h > +++ b/arch/microblaze/include/asm/processor.h > @@ -1 +1,4 @@ > -/* FIXME: Implement this! */ > + > +/* References to section boundaries */ > +extern char __end[]; > +extern char __text_start[]; should have proper #ifdef protection against multiple inclusion, and be nice to have a copyright/license comment block. -mike
Mike Frysinger wrote: > On Tuesday, September 13, 2011 03:10:07 Michal Simek wrote: >> --- a/arch/microblaze/include/asm/processor.h >> +++ b/arch/microblaze/include/asm/processor.h >> @@ -1 +1,4 @@ >> -/* FIXME: Implement this! */ >> + >> +/* References to section boundaries */ >> +extern char __end[]; >> +extern char __text_start[]; > > should have proper #ifdef protection against multiple inclusion, and be nice > to have a copyright/license comment block. Fixed. Thanks, Michal
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 78b8976..f35e31e 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h @@ -1 +1,4 @@ -/* FIXME: Implement this! */ + +/* References to section boundaries */ +extern char __end[]; +extern char __text_start[]; diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 5510c12..af33a15 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -84,6 +84,8 @@ init_fnc_t *init_sequence[] = { NULL, }; +unsigned long monitor_flash_len; + void board_init (void) { bd_t *bd; @@ -105,6 +107,8 @@ void board_init (void) bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ + monitor_flash_len = __end - __text_start; + /* * The Malloc area is immediately below the monitor copy in DRAM * aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off
Signed-off-by: Michal Simek <monstr@monstr.eu> --- v2: Change symbol references provided by a linker script v3: Move externs to header --- arch/microblaze/include/asm/processor.h | 5 ++++- arch/microblaze/lib/board.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletions(-)