from richard miller: Revised advice message for firmware version compatibility (rev numbering was dropped around Jul 2013 and resumed as a timestamp on 19 Aug). Reference: /n/atom/patch/applied2013/bcm-fw-date Date: Fri Sep 20 14:42:18 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/9/bcm/main.c Fri Sep 20 14:41:59 2013 +++ /sys/src/9/bcm/main.c Fri Sep 20 14:41:59 2013 @@ -10,9 +10,14 @@ #include "reboot.h" +enum { + /* space for syscall args, return PC, top-of-stack struct */ + Ustkheadroom = sizeof(Sargs) + sizeof(uintptr) + sizeof(Tos), +}; + /* Firmware compatibility */ #define Minfirmrev 326770 -#define Minfirmdate "22 Jul 2012" +#define Minfirmdate "19 Aug 2013" /* * Where configuration info is left for the loaded programme. @@ -266,9 +271,10 @@ rev = getfirmware(); print("firmware: rev %d\n", rev); if(rev < Minfirmrev){ - print("Sorry, firmware (start.elf) must be at least rev %d (%s)\n", - Minfirmrev, Minfirmdate); - for(;;){} + print("Sorry, firmware (start*.elf) must be at least rev %d" + " or newer than %s\n", Minfirmrev, Minfirmdate); + for(;;) + ; } trapinit(); clockinit(); @@ -349,7 +355,7 @@ * of the argument list checked in syscall. */ i = oargblen+1; - p = UINT2PTR(STACKALIGN(base + BY2PG - sizeof(Tos) - i)); + p = UINT2PTR(STACKALIGN(base + BY2PG - Ustkheadroom - i)); memmove(p, oargb, i); /* @@ -441,7 +447,7 @@ uintptr pa; char *p; - if((p = getconf("*maxmem")) != nil) { + if((p = getconf("*maxmem")) != nil){ memsize = strtoul(p, 0, 0) - PHYSDRAM; if (memsize < 16*MB) /* sanity */ memsize = 16*MB;