openbsd-ports/emulators/bochs/patches/patch-cpu_ctrl_xfer16_cc
todd 923f7975fe o take over maintainership
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.
2001-02-02 16:59:05 +00:00

113 lines
4.2 KiB
Plaintext

$OpenBSD: patch-cpu_ctrl_xfer16_cc,v 1.1 2001/02/02 16:59:07 todd Exp $
--- cpu/ctrl_xfer16.cc.orig Sat Mar 25 21:39:07 2000
+++ cpu/ctrl_xfer16.cc Tue Oct 17 12:04:00 2000
@@ -52,7 +52,7 @@ BX_CPU_C::RETnear16_Iw(BxInstruction_t *
if (protected_mode()) {
if ( !can_pop(2) ) {
- bx_panic("retnear_iw: can't pop IP\n");
+ bio->panic("retnear_iw: can't pop IP\n");
/* ??? #SS(0) -or #GP(0) */
}
@@ -60,11 +60,11 @@ BX_CPU_C::RETnear16_Iw(BxInstruction_t *
2, CPL==3, BX_READ, &return_IP);
if ( return_IP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled ) {
- bx_panic("retnear_iw: IP > limit\n");
+ bio->panic("retnear_iw: IP > limit\n");
}
if ( !can_pop(2 + imm16) ) {
- bx_panic("retnear_iw: can't release bytes from stack\n");
+ bio->panic("retnear_iw: can't release bytes from stack\n");
/* #GP(0) -or #SS(0) ??? */
}
@@ -106,7 +106,7 @@ BX_CPU_C::RETnear16(BxInstruction_t *i)
if (protected_mode()) {
if ( !can_pop(2) ) {
- bx_panic("retnear: can't pop IP\n");
+ bio->panic("retnear: can't pop IP\n");
/* ??? #SS(0) -or #GP(0) */
}
@@ -114,7 +114,7 @@ BX_CPU_C::RETnear16(BxInstruction_t *i)
2, CPL==3, BX_READ, &return_IP);
if ( return_IP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled ) {
- bx_panic("retnear: IP > limit\n");
+ bio->panic("retnear: IP > limit\n");
}
BX_CPU_THIS_PTR eip = return_IP;
@@ -217,7 +217,7 @@ BX_CPU_C::CALL_Aw(BxInstruction_t *i)
#if BX_CPU_LEVEL >= 2
if ( protected_mode() &&
(new_EIP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled) ) {
- bx_panic("call_av: new_IP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].limit\n");
+ bio->panic("call_av: new_IP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].limit\n");
exception(BX_GP_EXCEPTION, 0, 0);
}
#endif
@@ -290,11 +290,11 @@ BX_CPU_C::CALL_Ew(BxInstruction_t *i)
#if BX_CPU_LEVEL >= 2
if (protected_mode()) {
if (op1_16 > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled) {
- bx_panic("call_ev: IP out of CS limits!\n");
+ bio->panic("call_ev: IP out of CS limits!\n");
exception(BX_GP_EXCEPTION, 0, 0);
}
if ( !can_push(&BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache, temp_ESP, 2) ) {
- bx_panic("call_ev: can't push IP\n");
+ bio->panic("call_ev: can't push IP\n");
}
}
#endif
@@ -318,7 +318,7 @@ BX_CPU_C::CALL16_Ep(BxInstruction_t *i)
/* op1_16 is a register or memory reference */
if (i->mod == 0xc0) {
- bx_panic("CALL_Ep: op1 is a register");
+ bio->panic("CALL_Ep: op1 is a register");
}
/* pointer, segment address pair */
@@ -358,7 +358,7 @@ BX_CPU_C::JMP_Jw(BxInstruction_t *i)
#if BX_CPU_LEVEL >= 2
if (protected_mode()) {
if ( new_EIP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled ) {
- bx_panic("jmp_jv: offset outside of CS limits\n");
+ bio->panic("jmp_jv: offset outside of CS limits\n");
exception(BX_GP_EXCEPTION, 0, 0);
}
}
@@ -403,7 +403,7 @@ BX_CPU_C::JCC_Jw(BxInstruction_t *i)
#if BX_CPU_LEVEL >= 2
if (protected_mode()) {
if ( new_EIP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled ) {
- bx_panic("jo_routine: offset outside of CS limits\n");
+ bio->panic("jo_routine: offset outside of CS limits\n");
exception(BX_GP_EXCEPTION, 0, 0);
}
}
@@ -443,7 +443,7 @@ BX_CPU_C::JMP_Ew(BxInstruction_t *i)
#if BX_CPU_LEVEL >= 2
if (protected_mode()) {
if (new_EIP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled) {
- bx_panic("jmp_ev: IP out of CS limits!\n");
+ bio->panic("jmp_ev: IP out of CS limits!\n");
exception(BX_GP_EXCEPTION, 0, 0);
}
}
@@ -465,7 +465,7 @@ BX_CPU_C::JMP16_Ep(BxInstruction_t *i)
/* op1_16 is a register or memory reference */
if (i->mod == 0xc0) {
/* far indirect must specify a memory address */
- bx_panic("JMP_Ep(): op1 is a register\n");
+ bio->panic("JMP_Ep(): op1 is a register\n");
}
/* pointer, segment address pair */