From a319ab0471ecf0fe13d6a008f3d40a03d9667287 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 28 May 2009 20:55:46 +0000 Subject: 2009-05-25 Allan Hessenflow * start/start.S: Correct call to boot_card to meet bfin abi by clearing l0 - l3 and allocating some stack space. --- c/src/lib/libbsp/bfin/bf537Stamp/ChangeLog | 5 +++++ c/src/lib/libbsp/bfin/bf537Stamp/start/start.S | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'c/src/lib/libbsp/bfin') diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/ChangeLog b/c/src/lib/libbsp/bfin/bf537Stamp/ChangeLog index edf09ed075..3fb60fcab5 100644 --- a/c/src/lib/libbsp/bfin/bf537Stamp/ChangeLog +++ b/c/src/lib/libbsp/bfin/bf537Stamp/ChangeLog @@ -1,3 +1,8 @@ +2009-05-25 Allan Hessenflow + + * start/start.S: Correct call to boot_card to meet bfin abi by + clearing l0 - l3 and allocating some stack space. + 2009-05-25 Allan Hessenflow PR 1418/bsps diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S b/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S index 09282b4b78..43c3398dbb 100644 --- a/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S +++ b/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S @@ -7,10 +7,6 @@ #include #include -#warning Call to boot_card has changed and needs checking. -#warning The call is "void boot_card(const char* cmdline);" -#warning Please check and remove these warnings. - #ifndef LO #define LO(con32) ((con32) & 0xFFFF) #endif @@ -51,6 +47,12 @@ __start: p0.l = LO(SIC_IMASK); [p0] = r0; + /* clear any pending interrupts */ + p0.h = HI(CEC_ILAT); + p0.l = LO(CEC_ILAT); + r0 = 0xffff (z); + [p0] = r0; + /* this is so we can stay in supervisor mode and still be able to accept interrupts later. */ p0.h = start; @@ -96,9 +98,16 @@ start: loop1: b[p0] = r0; loop2: p0 +=1; + l0 = 0; + l1 = 0; + l2 = 0; + l3 = 0; + sp += -12; + /* r0 == const char *cmdline (currently null) */ p0.h = _boot_card; p0.l = _boot_card; call (p0); + sp += 12; p0.h = _exit; p0.l = _exit; -- cgit v1.2.3