Browse Source

params passing to kernel is sitting in non-reserved area for pmon, see a1,

a2, a3;

   zero      at       v0       v1       a0       a1       a2       a3
   00000000 00000000 00000000 00000000 00000004 8afffee0 8affff30 8f121b30
   t0       t1       t2       t3       t4       t5       t6       t7
   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   s0       s1       s2       s3       s4       s5       s6       s7
   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   t8       t9       k0       k1       gp       sp       s8       ra
   00000000 00000000 00000000 00000000 00000000 8afffec0 00000000 8f0aa510

this may cause the param is modified by kernel; change the client stack to
reserved pmon area, so the param allocated on stack is safe;

   zero      at       v0       v1       a0       a1       a2       a3
   00000000 00000000 00000000 00000000 00000004 8f00fee0 8f00ff30 8f121b50
   t0       t1       t2       t3       t4       t5       t6       t7
   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   s0       s1       s2       s3       s4       s5       s6       s7
   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   t8       t9       k0       k1       gp       sp       s8       ra
   00000000 00000000 00000000 00000000 00000000 8f00fec0 00000000 8f0aa510

ps: set boot_param to be static allocated causing other error, so we have
to do this way;

submitted by 'Qiao Chong' <qiaochong@loongson.cn>

Change-Id: I02d9de3ff0e679ca1786cd387532fde0344249f2
master
Huang Pei 10 years ago
parent
commit
508a34afa4
  1. 3
      Targets/Bonito3a780e/Bonito/tgt_machdep.c

3
Targets/Bonito3a780e/Bonito/tgt_machdep.c

@ -1084,7 +1084,8 @@ tgt_machprint()
register_t
tgt_clienttos()
{
return((register_t)(int)PHYS_TO_CACHED(memorysize & ~7) - 64);
extern char start[];
return(register_t)(int)PHYS_TO_CACHED(start - 64);
}
#ifdef HAVE_FLASH

Loading…
Cancel
Save