[OSy] Podezreni na bug v msimu u syscallu

Roman Kapl rkapl at volny.cz
Wed Feb 11 11:49:07 CET 2015


Dobre odpoledne,
"The processor does not write to the EPC register when the EXL bit in 
the Status register is set to a 1.", PDF strana 142,
nemuze to byt tohle? To by take odpovidalo, jelikoz me vetsinou MSIM 
upozorni, ze neco do EPC zapsal.

Roman Kapl

Dne 2/11/2015 v 11:09 AM Jethro napsal(a):
> Dobre dopoledne,
> kdyz nyni finisujeme s rozhranim systemovych volani, zacal se nam nas 
> system chovat zvlastne a myslime si, ze jde o chybu v msimu. Pri 
> zavolani syscallu se skoci do kernel modu a v nem by mel (alespon dle 
> manualu, strana 100) byt v epc ulozena adresa volani syscallu (ten 
> neni v branch delay slotu). Kdyz se ale o nekolik instrukci nize epc 
> vycte, je na nem adresa jina. Nize prikladame cast vypisu z msimu s 
> trace=on
>  0  00002270    addiu sp, sp, 0xffe8    # sp: 0x42fe0->0x42fc8
>  0  00002274    addiu a0, 0, 0x1        # a0: 0xf->0x1
>  0  00002278    addiu a1, 0, 0x5e       # 0x5e=94, a1: 0x2270->0x5e
>  0  0000227C    sw    s0, 0x10(sp)      # 0x10=16
>  0  00002280    addu  a2, 0, 0          # a2: 0x43000->0x0
>  0  00002284    lw    s0, 0x28(sp)      # 0x28=40, s0: 0x4242->0x1020
>  0  00002288    sw    ra, 0x14(sp)      # 0x14=20
>  0  0000228C    jal   +0x428            # 0x428=1064, ra: 0x2270->0x2294
>  0  00002290    addu  a3, 0, 0
>  0  000010A0    addiu sp, sp, 0xfff8    # sp: 0x42fc8->0x42fc0
>  0  000010A4    sw    ra, 0x4(sp)
>  0  000010A8    syscall0x0
>
> Raised exception: Syscall
>
>  0  80000180    j     +0x225e           # 0x225e=8798, cp0_cause: 
> 0x80000000->0x00000020
>  0  80000184    nop
>  0  80008978    lui   k0, 0xb000        # 0xb000=45056, k0: 
> 0x1000ff13->0xb0000000
>  0  8000897C    ori   k0, k0, 0x0004    # k0: 0xb0000000->0xb0000004
>  0  80008980    lw    k1, (k0)
>  0  80008984    sll   k0, k1, 0x0a      # 0xa=10, k0: 0xb0000004->0x0
>  0  80008988    lui   k1, 0x8000        # 0x8000=32768, k1: 
> 0x0->0x80000000
>  0  8000898C    addu  k1, k1, k0
>  0  80008990    addiu k0, 0, 0x400      # 0x400=1024, k0: 0x0->0x400
>  0  80008994    addu  k1, k1, k0        # k1: 0x80000000->0x80000400
>  0  80008998    mfc0  k0, epc           # k0: 0x400->0x108c
>
> v k0 bychom ocekavali 0x10A8, ale je tam 0x108C. V priloze posilame i 
> binarku (to doufam nebude problem se sdilenim naseho kodu), kdyby nam 
> nekdo mel cas a chut pomoci, zdrojak toto zpusobujici je v nasem 
> repozitari pod commitem 190a474
> Budeme radi za pomoc nebo aspon popostrceni spravnym smerem.
> Tym BaPoSt
>
>
> _______________________________________________
> OSy mailing list
> OSy at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/osy



---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/nswi004/attachments/20150211/43affc0c/attachment.html>


More information about the NSWI004 mailing list