923f7975fe
o too many changes to mention specifically, but amongst them: - better error reporting - openbsd boots, freebsd boots - new 'term' flavor, I added a textmode interface, the only drawback is that control-c is intercepted, and you must kill -9 it from another tty if it doesn't exit normally - new flavors: - debugger -> debug (for shortness) - i386 - pci - smp - net (compiles, does not yet provide networking, if anyone wants to help, I'd be ELATED to have this fixed!) - no_x11 (made it actually work) - term (make sure to use 'log: /dev/null' or something else on the cmdline, otherwise, debugging and the screen will start getting quite confusing!) - better error reporting (and no error reporting where it is not necessary; a typicall boot of cdrom28.fs is a screenful of output now) - in general, if the hardware reaches an unknown state, fail gracefully instead of calling exit(1) .. are we trying to work or are we trying to .. fail? I like working myself.
113 lines
4.0 KiB
Plaintext
113 lines
4.0 KiB
Plaintext
$OpenBSD: patch-cpu_stack32_cc,v 1.1 2001/02/02 16:59:09 todd Exp $
|
|
--- cpu/stack32.cc.orig Sat Mar 25 21:39:09 2000
|
|
+++ cpu/stack32.cc Tue Oct 17 12:04:01 2000
|
|
@@ -200,7 +200,7 @@ BX_CPU_C::POP_SS(BxInstruction_t *i)
|
|
BX_CPU_C::PUSHAD32(BxInstruction_t *i)
|
|
{
|
|
#if BX_CPU_LEVEL < 2
|
|
- bx_panic("PUSHAD: not supported on an 8086\n");
|
|
+ bio->panic("PUSHAD: not supported on an 8086\n");
|
|
#else
|
|
Bit32u temp_ESP;
|
|
Bit32u esp;
|
|
@@ -213,14 +213,14 @@ BX_CPU_C::PUSHAD32(BxInstruction_t *i)
|
|
|
|
if (protected_mode()) {
|
|
if ( !can_push(&BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache, temp_ESP, 32) ) {
|
|
- bx_panic("PUSHAD(): stack doesn't have enough room!\n");
|
|
+ bio->panic("PUSHAD(): stack doesn't have enough room!\n");
|
|
exception(BX_SS_EXCEPTION, 0, 0);
|
|
return;
|
|
}
|
|
}
|
|
else {
|
|
if (temp_ESP < 32)
|
|
- bx_panic("pushad: eSP < 32\n");
|
|
+ bio->panic("pushad: eSP < 32\n");
|
|
}
|
|
|
|
esp = ESP;
|
|
@@ -241,13 +241,13 @@ BX_CPU_C::PUSHAD32(BxInstruction_t *i)
|
|
BX_CPU_C::POPAD32(BxInstruction_t *i)
|
|
{
|
|
#if BX_CPU_LEVEL < 2
|
|
- bx_panic("POPAD not supported on an 8086\n");
|
|
+ bio->panic("POPAD not supported on an 8086\n");
|
|
#else /* 286+ */
|
|
Bit32u edi, esi, ebp, etmp, ebx, edx, ecx, eax;
|
|
|
|
if (protected_mode()) {
|
|
if ( !can_pop(32) ) {
|
|
- bx_panic("pop_ad: not enough bytes on stack\n");
|
|
+ bio->panic("pop_ad: not enough bytes on stack\n");
|
|
exception(BX_SS_EXCEPTION, 0, 0);
|
|
return;
|
|
}
|
|
@@ -277,7 +277,7 @@ BX_CPU_C::POPAD32(BxInstruction_t *i)
|
|
BX_CPU_C::PUSH_Id(BxInstruction_t *i)
|
|
{
|
|
#if BX_CPU_LEVEL < 2
|
|
- bx_panic("PUSH_Iv: not supported on 8086!\n");
|
|
+ bio->panic("PUSH_Iv: not supported on 8086!\n");
|
|
#else
|
|
|
|
Bit32u imm32;
|
|
@@ -310,7 +310,7 @@ BX_CPU_C::PUSH_Ed(BxInstruction_t *i)
|
|
BX_CPU_C::ENTER_IwIb(BxInstruction_t *i)
|
|
{
|
|
#if BX_CPU_LEVEL < 2
|
|
- bx_panic("ENTER_IwIb: not supported by 8086!\n");
|
|
+ bio->panic("ENTER_IwIb: not supported by 8086!\n");
|
|
#else
|
|
Bit32u frame_ptr32;
|
|
Bit16u frame_ptr16;
|
|
@@ -322,10 +322,10 @@ BX_CPU_C::ENTER_IwIb(BxInstruction_t *i)
|
|
|
|
level %= 32;
|
|
/* ??? */
|
|
-if (level) bx_panic("enter(): level > 0\n");
|
|
+if (level) bio->panic("enter(): level > 0\n");
|
|
//if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.u.segment.d_b && i->os_32==0) {
|
|
-// bx_printf("enter(): stacksize!=opsize: I'm unsure of the code for this\n");
|
|
-// bx_panic(" The Intel manuals are a mess on this one!\n");
|
|
+// bio->printf("enter(): stacksize!=opsize: I'm unsure of the code for this\n");
|
|
+// bio->panic(" The Intel manuals are a mess on this one!\n");
|
|
// }
|
|
|
|
if ( protected_mode() ) {
|
|
@@ -348,7 +348,7 @@ if (level) bx_panic("enter(): level > 0\
|
|
else
|
|
temp_ESP = SP;
|
|
if ( !can_push(&BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache, temp_ESP, bytes_to_push) ) {
|
|
- bx_panic("ENTER: not enough room on stack!\n");
|
|
+ bio->panic("ENTER: not enough room on stack!\n");
|
|
exception(BX_SS_EXCEPTION, 0, 0);
|
|
}
|
|
}
|
|
@@ -444,7 +444,7 @@ if (level) bx_panic("enter(): level > 0\
|
|
BX_CPU_C::LEAVE(BxInstruction_t *i)
|
|
{
|
|
#if BX_CPU_LEVEL < 2
|
|
- bx_panic("LEAVE: not supported by 8086!\n");
|
|
+ bio->panic("LEAVE: not supported by 8086!\n");
|
|
#else
|
|
Bit32u temp_EBP;
|
|
|
|
@@ -461,14 +461,14 @@ BX_CPU_C::LEAVE(BxInstruction_t *i)
|
|
if ( protected_mode() ) {
|
|
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.u.segment.c_ed) { /* expand up */
|
|
if (temp_EBP <= BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.u.segment.limit_scaled) {
|
|
- bx_panic("LEAVE: BP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].limit\n");
|
|
+ bio->panic("LEAVE: BP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].limit\n");
|
|
exception(BX_SS_EXCEPTION, 0, 0);
|
|
return;
|
|
}
|
|
}
|
|
else { /* normal */
|
|
if (temp_EBP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.u.segment.limit_scaled) {
|
|
- bx_panic("LEAVE: BP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].limit\n");
|
|
+ bio->panic("LEAVE: BP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].limit\n");
|
|
exception(BX_SS_EXCEPTION, 0, 0);
|
|
return;
|
|
}
|