[OSy] Umisteni stacku

Nodir Yuldashev y_nodir at yahoo.com
Tue Jan 9 05:47:23 CET 2007


Zdravim,

po dlouhe noci, nasel jsem nakonec v cem byl problem.
Z vypisu dole je videt (instrukce na adresach 800029F8
a 00000000), ze po okopirovani vsech 32Kb se skace na
adresu 0x0 ktera se zapise v registr "ra". Zda se, ze
mezi 0..32Kb se nachazi stack kernelu (protoze v
gp=0)? Tohle nemuzu pochopit, ve virtualnim adresovem
prostoru by stack mel nachazet v (KSEG0 | 0x200) a
fyzicky se nachazi na adrese 0x200. Jak udelat tak,
aby to kopirovani 32Kb se neprepisovalo stack?
Docasne jsem to vyresil tak, ze jsem
PROGRAM_BEGIN_ADDRESS dal do vyssi adresy
(0x00020000), ale chtel bych to mit 0x0, aby to bylo
hezke ucesany. :)


NY.


process.c: line 125
i = 32767
processor p0
   0 00000000   at 00000000   v0 00007FFF   v1
90007FFF   a0 00000000
  a1 A1000000   a2 00000000   a3 8000A63D   t0
00000019   t1 80009974
  t2 00000012   t3 00000000   t4 00000000   t5
00000000   t6 00000000
  t7 00000000   s0 00008000   s1 00000000   s2
00008000   s3 90000000
  s4 80010000   s5 80010000   s6 80010000   s7
00000000   t8 00000000
  t9 00000000   k0 80010000   k1 00000001   gp
00000000   sp 80000550
  fp 00000000   ra 800029D4   pc 800029EC   lo
00000000   hi 00000003

    800029EC    d_trace
    800029F0    ---
[msim]
    800029F4    addu  v1, 0, 0          # v1:
0x90007fff->0x0
[msim]
    800029F8    lw    ra, 0x34(sp)      # 0x34=52, ra:
0x800029d4->0x0
[msim]
    800029FC    lw    s6, 0x30(sp)      # 0x30=48, s6:
0x80010000->0x0
[msim]
    80002A00    lw    s5, 0x2c(sp)      # 0x2c=44, s5:
0x80010000->0x0
[msim]
    80002A04    lw    s4, 0x28(sp)      # 0x28=40, s4:
0x80010000->0x0
[msim]
    80002A08    lw    s3, 0x24(sp)      # 0x24=36, s3:
0x90000000->0x0
[msim]
    80002A0C    lw    s2, 0x20(sp)      # 0x20=32, s2:
0x8000->0x0
[msim]
    80002A10    lw    s1, 0x1c(sp)      # 0x1c=28
[msim]
    80002A14    lw    s0, 0x18(sp)      # 0x18=24, s0:
0x8000->0x0
[msim]
    80002A18    addu  v0, v1, 0         # v0:
0x7fff->0x0
[msim]
    80002A1C    jr    ra
[msim]
    80002A20    addiu sp, sp, 0x38      # 0x38=56, sp:
0x80000550->0x80000588
[msim]
    00000000    j     +0x754            # 0x754=1876
[msim]
    00000004    nop
[msim]
    00000754    lui   k1, 0x8000        #
0x8000=32768, k1: 0x1->0x80000000


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the NSWI004 mailing list