This commit is contained in:
Stanislav Shwartsman 2009-12-28 09:26:22 +00:00
parent ddf4df1dc0
commit e59ff3d779
6 changed files with 15 additions and 21 deletions

View File

@ -7,6 +7,7 @@ Changes after 2.4.2:
- Internal Debugger
- Introduced range read/write physical watchpoints
- Allow reloading of segment registers from internal debugger
- Cleanup configure options
- Make --ignore-bad-msrs runtime option in .bochsrc. Old --ignore-bad-msrs

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: dbg_main.cc,v 1.222 2009-12-27 16:38:09 sshwarts Exp $
// $Id: dbg_main.cc,v 1.223 2009-12-28 09:26:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2009 The Bochs Project
@ -3603,7 +3603,7 @@ bx_bool bx_dbg_read_pmode_descriptor(Bit16u sel, bx_descriptor_t *descriptor)
}
memset (descriptor, 0, sizeof (descriptor));
BX_CPU(dbg_cpu)->parse_descriptor(dword1, dword2, descriptor);
parse_descriptor(dword1, dword2, descriptor);
if (!descriptor->segment) {
dbg_printf("bx_dbg_read_pmode_descriptor: selector 0x%04x points to a system descriptor and is not supported!\n", sel);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.h,v 1.633 2009-12-27 16:53:35 sshwarts Exp $
// $Id: cpu.h,v 1.634 2009-12-28 09:26:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2009 The Bochs Project
@ -3166,7 +3166,6 @@ public: // for now...
BX_SMF Bit32u read_eflags(void) { return BX_CPU_THIS_PTR force_flags(); }
BX_SMF bx_bool allow_io(bxInstruction_c *i, Bit16u addr, unsigned len) BX_CPP_AttrRegparmN(3);
BX_SMF void parse_descriptor(Bit32u dword1, Bit32u dword2, bx_descriptor_t *temp) BX_CPP_AttrRegparmN(3);
BX_SMF Bit32u get_descriptor_l(const bx_descriptor_t *) BX_CPP_AttrRegparmN(1);
BX_SMF Bit32u get_descriptor_h(const bx_descriptor_t *) BX_CPP_AttrRegparmN(1);
BX_SMF bx_bool set_segment_ar_data(bx_segment_reg_t *seg, bx_bool valid, Bit16u raw_selector,

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: descriptor.h,v 1.34 2009-12-27 16:53:35 sshwarts Exp $
// $Id: descriptor.h,v 1.35 2009-12-28 09:26:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007-2009 Stanislav Shwartsman
@ -191,5 +191,6 @@ typedef struct {
void parse_selector(Bit16u raw_selector, bx_selector_t *selector);
Bit8u get_ar_byte(const bx_descriptor_t *d);
void set_ar_byte(bx_descriptor_t *d, Bit8u ar_byte);
void parse_descriptor(Bit32u dword1, Bit32u dword2, bx_descriptor_t *temp);
#endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: segment_ctrl_pro.cc,v 1.125 2009-12-27 16:53:35 sshwarts Exp $
// $Id: segment_ctrl_pro.cc,v 1.126 2009-12-28 09:26:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2009 The Bochs Project
@ -433,8 +433,7 @@ bx_bool BX_CPU_C::set_segment_ar_data(bx_segment_reg_t *seg, bx_bool valid,
}
#endif
void BX_CPP_AttrRegparmN(3)
BX_CPU_C::parse_descriptor(Bit32u dword1, Bit32u dword2, bx_descriptor_t *temp)
void parse_descriptor(Bit32u dword1, Bit32u dword2, bx_descriptor_t *temp)
{
Bit8u AR_byte;
Bit32u limit;
@ -467,13 +466,6 @@ BX_CPU_C::parse_descriptor(Bit32u dword1, Bit32u dword2, bx_descriptor_t *temp)
}
else { // system & gate segment descriptors
switch (temp->type) {
case 0: // reserved
case 8: // reserved
case 10: // reserved
case 13: // reserved
temp->valid = 0;
break;
case BX_286_CALL_GATE:
case BX_286_INTERRUPT_GATE:
case BX_286_TRAP_GATE:
@ -507,7 +499,7 @@ BX_CPU_C::parse_descriptor(Bit32u dword1, Bit32u dword2, bx_descriptor_t *temp)
case BX_SYS_SEGMENT_BUSY_386_TSS:
limit = (dword1 & 0xffff) | (dword2 & 0x000F0000);
temp->u.segment.base = (dword1 >> 16) |
((dword2 & 0xff) << 16) | (dword2 & 0xff000000);
((dword2 & 0xff) << 16) | (dword2 & 0xff000000);
temp->u.segment.g = (dword2 & 0x00800000) > 0;
temp->u.segment.d_b = (dword2 & 0x00400000) > 0;
temp->u.segment.avl = (dword2 & 0x00100000) > 0;
@ -518,9 +510,9 @@ BX_CPU_C::parse_descriptor(Bit32u dword1, Bit32u dword2, bx_descriptor_t *temp)
temp->valid = 1;
break;
default:
BX_PANIC(("parse_descriptor(): case %u unfinished", (unsigned) temp->type));
temp->valid = 0;
default: // reserved
temp->valid = 0;
break;
}
}
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////
// $Id: plex86-interface.cc,v 1.18 2009-08-22 19:30:23 sshwarts Exp $
// $Id: plex86-interface.cc,v 1.19 2009-12-28 09:26:22 sshwarts Exp $
///////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 Kevin P. Lawton
@ -381,7 +381,8 @@ void copyPlex86DescriptorToBochs(BX_CPU_C *cpu,
/* We can assume little endian, since we're running an x86 VM. */
dword1 = dwordPtr[0];
dword2 = dwordPtr[1];
cpu->parse_descriptor(dword1, dword2, bochsDesc);
parse_descriptor(dword1, dword2, bochsDesc);
}
unsigned plex86RegisterGuestMemory(Bit8u *vector, unsigned bytes)