openbsd-ports/emulators/bochs/patches/patch-cpu_io_pro_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

97 lines
3.6 KiB
Plaintext

$OpenBSD: patch-cpu_io_pro_cc,v 1.1 2001/02/02 16:59:08 todd Exp $
--- cpu/io_pro.cc.orig Sat Mar 25 21:39:08 2000
+++ cpu/io_pro.cc Tue Oct 17 12:04:01 2000
@@ -38,7 +38,7 @@ BX_CPU_C::inp16(Bit16u addr)
if (BX_CPU_THIS_PTR cr0.pe && (BX_CPU_THIS_PTR eflags.vm || (CPL>IOPL))) {
if ( !BX_CPU_THIS_PTR allow_io(addr, 2) ) {
- // bx_printf("cpu_inp16: GP0()!\n");
+ // bio->printf("cpu_inp16: GP0()!\n");
exception(BX_GP_EXCEPTION, 0, 0);
return(0);
}
@@ -57,7 +57,7 @@ BX_CPU_C::outp16(Bit16u addr, Bit16u val
if (BX_CPU_THIS_PTR cr0.pe && (BX_CPU_THIS_PTR eflags.vm || (CPL>IOPL))) {
if ( !BX_CPU_THIS_PTR allow_io(addr, 2) ) {
- // bx_printf("cpu_outp16: GP0()!\n");
+ // bio->printf("cpu_outp16: GP0()!\n");
exception(BX_GP_EXCEPTION, 0, 0);
return;
}
@@ -73,7 +73,7 @@ BX_CPU_C::inp32(Bit16u addr)
if (BX_CPU_THIS_PTR cr0.pe && (BX_CPU_THIS_PTR eflags.vm || (CPL>IOPL))) {
if ( !BX_CPU_THIS_PTR allow_io(addr, 4) ) {
- // bx_printf("cpu_inp32: GP0()!\n");
+ // bio->printf("cpu_inp32: GP0()!\n");
exception(BX_GP_EXCEPTION, 0, 0);
return(0);
}
@@ -92,7 +92,7 @@ BX_CPU_C::outp32(Bit16u addr, Bit32u val
if (BX_CPU_THIS_PTR cr0.pe && (BX_CPU_THIS_PTR eflags.vm || (CPL>IOPL))) {
if ( !BX_CPU_THIS_PTR allow_io(addr, 4) ) {
- // bx_printf("cpu_outp32: GP0()!\n");
+ // bio->printf("cpu_outp32: GP0()!\n");
exception(BX_GP_EXCEPTION, 0, 0);
return;
}
@@ -108,7 +108,7 @@ BX_CPU_C::inp8(Bit16u addr)
if (BX_CPU_THIS_PTR cr0.pe && (BX_CPU_THIS_PTR eflags.vm || (CPL>IOPL))) {
if ( !BX_CPU_THIS_PTR allow_io(addr, 1) ) {
- // bx_printf("cpu_inp8: GP0()!\n");
+ // bio->printf("cpu_inp8: GP0()!\n");
exception(BX_GP_EXCEPTION, 0, 0);
return(0);
}
@@ -128,7 +128,7 @@ BX_CPU_C::outp8(Bit16u addr, Bit8u value
if (BX_CPU_THIS_PTR cr0.pe && (BX_CPU_THIS_PTR eflags.vm || (CPL>IOPL))) {
if ( !BX_CPU_THIS_PTR allow_io(addr, 1) ) {
- // bx_printf("cpu_outp8: GP0()!\n");
+ // bio->printf("cpu_outp8: GP0()!\n");
exception(BX_GP_EXCEPTION, 0, 0);
return;
}
@@ -145,28 +145,28 @@ BX_CPU_C::allow_io(Bit16u addr, unsigned
unsigned bit_index, i;
if (BX_CPU_THIS_PTR tr.cache.valid==0 || BX_CPU_THIS_PTR tr.cache.type!=9) {
- bx_printf("allow_io(): TR doesn't point to a valid 32bit TSS\n");
+ bio->printf("allow_io(): TR doesn't point to a valid 32bit TSS\n");
return(0);
}
if (BX_CPU_THIS_PTR tr.cache.u.tss386.limit_scaled < 103) {
- bx_panic("allow_io(): TR.limit < 103\n");
+ bio->panic("allow_io(): TR.limit < 103\n");
}
access_linear(BX_CPU_THIS_PTR tr.cache.u.tss386.base + 102, 2, 0, BX_READ,
&io_base);
if (io_base <= 103) {
-bx_printf("PE is %u\n", BX_CPU_THIS_PTR cr0.pe);
-bx_printf("VM is %u\n", BX_CPU_THIS_PTR eflags.vm);
-bx_printf("CPL is %u\n", CPL);
-bx_printf("IOPL is %u\n", IOPL);
-bx_printf("addr is %u\n", addr);
-bx_printf("len is %u\n", len);
- bx_panic("allow_io(): TR:io_base <= 103\n");
+bio->printf("PE is %u\n", BX_CPU_THIS_PTR cr0.pe);
+bio->printf("VM is %u\n", BX_CPU_THIS_PTR eflags.vm);
+bio->printf("CPL is %u\n", CPL);
+bio->printf("IOPL is %u\n", IOPL);
+bio->printf("addr is %u\n", addr);
+bio->printf("len is %u\n", len);
+ bio->panic("allow_io(): TR:io_base <= 103\n");
}
if (io_base > BX_CPU_THIS_PTR tr.cache.u.tss386.limit_scaled) {
- bx_printf("allow_io(): CPL > IOPL: no IO bitmap defined #GP(0)\n");
+ bio->printf("allow_io(): CPL > IOPL: no IO bitmap defined #GP(0)\n");
return(0);
}