Bochs invalidates SS when restored
Posted: Fri Mar 11, 2011 9:30 am
Hi, It seems that bochs invalidates SS (sregs[2]->cache.valid=0) and any other register with selector->value & 0xfffc) == 0 in bx_cpu_c::param_restore_handler, thus simulation states before and after restore doesn't match.
Example:
before
after
I would like to know why. Thanks
Example:
before
Code: Select all
es:0xf000, dh=0x0000930f, dl=0x0000ffff, valid=1
Data segment, base=0x000f0000, limit=0x0000ffff, Read/Write, Accessed
cs:0x9000, dh=0x00009309, dl=0x0000ffff, valid=1
Data segment, base=0x00090000, limit=0x0000ffff, Read/Write, Accessed
ss:0x0000, dh=0x00009300, dl=0x0000ffff, valid=7
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
ds:0x0000, dh=0x00009300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
fs:0x0000, dh=0x00009300, dl=0x0000ffff, valid=7
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
gs:0x0000, dh=0x00009300, dl=0x0000ffff, valid=7
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
ldtr:0x0000, dh=0x00008200, dl=0x0000ffff, valid=1
tr:0x0000, dh=0x00008b00, dl=0x0000ffff, valid=1
gdtr:base=0x00000000, limit=0xffff
idtr:base=0x00000000, limit=0xffff
Code: Select all
es:0xf000, dh=0x0000930f, dl=0x0000ffff, valid=1
Data segment, base=0x000f0000, limit=0x0000ffff, Read/Write, Accessed
cs:0x9000, dh=0x00009309, dl=0x0000ffff, valid=1
Data segment, base=0x00090000, limit=0x0000ffff, Read/Write, Accessed
ss:0x0000, dh=0x00009300, dl=0x0000ffff, valid=0
ds:0x0000, dh=0x00009300, dl=0x0000ffff, valid=0
fs:0x0000, dh=0x00009300, dl=0x0000ffff, valid=0
gs:0x0000, dh=0x00009300, dl=0x0000ffff, valid=0
ldtr:0x0000, dh=0x00008200, dl=0x0000ffff, valid=0
tr:0x0000, dh=0x00008b00, dl=0x0000ffff, valid=0
gdtr:base=0x00000000, limit=0xffff
idtr:base=0x00000000, limit=0xffff