OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [bios/] [bochs-2.6.2/] [bochs-2.6.2.diff] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 alfik
diff -ruN bochs-2.6.2/bios/rombios.c bochs-2.6.2-ao486/bios/rombios.c
2
--- bochs-2.6.2/bios/rombios.c  2013-04-21 22:09:49.000000000 +0200
3
+++ bochs-2.6.2-ao486/bios/rombios.c    2014-03-30 14:27:08.000000000 +0200
4
@@ -182,7 +182,7 @@
5
   ;; However, users can choose to make panics non-fatal and continue.
6
 #if BX_VIRTUAL_PORTS
7
   mov dx,#PANIC_PORT
8
-  mov ax,#?1
9
+  mov ax,#0x21 //ao #?1
10
   out dx,ax
11
 #else
12
   mov dx,#0x80
13
@@ -1537,8 +1537,12 @@
14
   uart_tx_byte(BX_DEBUG_PORT, c);
15
 #endif
16
 #if BX_VIRTUAL_PORTS
17
-  if (action & BIOS_PRINTF_DEBUG) outb(DEBUG_PORT, c);
18
-  if (action & BIOS_PRINTF_INFO) outb(INFO_PORT, c);
19
+  if((action & BIOS_PRINTF_DEBUG) || (action & BIOS_PRINTF_INFO) || (action & BIOS_PRINTF_SCREEN)) {
20
+    while(inw(DEBUG_PORT+6) == 0) { ; }
21
+  }
22
+  if (action & BIOS_PRINTF_DEBUG)  outb(DEBUG_PORT, c);
23
+  if (action & BIOS_PRINTF_INFO)   outb(INFO_PORT, c);
24
+  if (action & BIOS_PRINTF_SCREEN) outb(INFO_PORT, c);
25
 #endif
26
   if (action & BIOS_PRINTF_SCREEN) {
27
     if (c == '\n') wrch('\r');
28
@@ -1702,7 +1706,7 @@
29
 
30
   if ((action & BIOS_PRINTF_DEBHALT) == BIOS_PRINTF_DEBHALT) {
31
 #if BX_VIRTUAL_PORTS
32
-    outb(PANIC_PORT2, 0x00);
33
+    outb(PANIC_PORT2, '&'); //ao 0x00
34
 #endif
35
     bios_printf (BIOS_PRINTF_SCREEN, "FATAL: ");
36
   }
37
@@ -2509,7 +2513,9 @@
38
   Bit16u base;
39
   Bit16u timeout;
40
 {
41
-  Bit32u time=0,last=0;
42
+//AO modif
43
+  Bit16u time=0,last=0;
44
+//AO modif
45
   Bit16u status;
46
   Bit8u result;
47
   status = inb(base + ATA_CB_STAT); // for the times you're supposed to throw one away
48
@@ -2530,17 +2536,27 @@
49
       result = 0;
50
 
51
     if (result) return 0;
52
-    if (time>>16 != last) // mod 2048 each 16 ms
53
+//AO modif
54
+    if (time>>8 != last) // mod 2048 each 16 ms
55
+//AO modif
56
     {
57
-      last = time >>16;
58
-      BX_DEBUG_ATA("await_ide: (TIMEOUT,BSY,!BSY,!BSY_DRQ,!BSY_!DRQ,!BSY_RDY) %d time= %ld timeout= %d\n",when_done,time>>11, timeout);
59
+//AO modif
60
+      last = time >>8;
61
+//AO modif
62
+//AO modif
63
+      BX_DEBUG_ATA("await_ide: (TIMEOUT,BSY,!BSY,!BSY_DRQ,!BSY_!DRQ,!BSY_RDY) %d time= %ld timeout= %d, status= %x\n",when_done,time>>3, timeout, status);
64
+//AO modif
65
     }
66
     if (status & ATA_CB_STAT_ERR)
67
     {
68
-      BX_DEBUG_ATA("await_ide: ERROR (TIMEOUT,BSY,!BSY,!BSY_DRQ,!BSY_!DRQ,!BSY_RDY) %d time= %ld timeout= %d\n",when_done,time>>11, timeout);
69
+//AO modif
70
+      BX_DEBUG_ATA("await_ide: ERROR (TIMEOUT,BSY,!BSY,!BSY_DRQ,!BSY_!DRQ,!BSY_RDY) %d time= %ld timeout= %d\n",when_done,time>>3, timeout);
71
+//AO modif
72
       return -1;
73
     }
74
-    if ((timeout == 0) || ((time>>11) > timeout)) break;
75
+//AO modif
76
+    if ((timeout == 0) || ((time>>3) > timeout)) break;
77
+//AO modif
78
   }
79
   BX_INFO("IDE time out\n");
80
   return -1;
81
@@ -3099,7 +3115,10 @@
82
     current++;
83
     write_word_DS(&EbdaData->ata.trsfsectors,current);
84
     count--;
85
-    if(ioflag == 0) await_ide(NOT_BSY, iobase1, IDE_TIMEOUT);
86
+//AO modification start
87
+//modif    if(ioflag == 0) await_ide(NOT_BSY, iobase1, IDE_TIMEOUT);
88
+    await_ide(NOT_BSY, iobase1, IDE_TIMEOUT);
89
+//AO modification end
90
     status = inb(iobase1 + ATA_CB_STAT);
91
     if(ioflag == 0)
92
     {
93
diff -ruN bochs-2.6.2/bios/rombios.h bochs-2.6.2-ao486/bios/rombios.h
94
--- bochs-2.6.2/bios/rombios.h  2012-11-11 09:11:17.000000000 +0100
95
+++ bochs-2.6.2-ao486/bios/rombios.h    2014-03-30 14:29:31.000000000 +0200
96
@@ -39,10 +39,10 @@
97
 #define DEBUG_INT74        0
98
 #define DEBUG_APM          0
99
 
100
-#define PANIC_PORT  0x400
101
-#define PANIC_PORT2 0x401
102
-#define INFO_PORT   0x402
103
-#define DEBUG_PORT  0x403
104
+#define PANIC_PORT  0x8888 //ao 0x400
105
+#define PANIC_PORT2 0x8888 //ao 0x401
106
+#define INFO_PORT   0x8888 //ao 0x402
107
+#define DEBUG_PORT  0x8888 //ao 0x403
108
 
109
 #define BIOS_PRINTF_HALT     1
110
 #define BIOS_PRINTF_SCREEN   2
111
@@ -95,19 +95,19 @@
112
 #define BX_USE_EBDA      1
113
 #define BX_SUPPORT_FLOPPY 1
114
 #define BX_FLOPPY_ON_CNT 37   /* 2 seconds */
115
-#define BX_PCIBIOS       1
116
-#define BX_APM           1
117
-#define BX_PNPBIOS       1
118
+#define BX_PCIBIOS       0 //ao
119
+#define BX_APM           0 //ao
120
+#define BX_PNPBIOS       0 //ao
121
 /* define it if the (emulated) hardware supports SMM mode */
122
 #define BX_USE_SMM
123
 
124
 #define BX_USE_ATADRV    1
125
-#define BX_ELTORITO_BOOT 1
126
+#define BX_ELTORITO_BOOT 0 //ao
127
 
128
 #define BX_MAX_ATA_INTERFACES   4
129
 #define BX_MAX_ATA_DEVICES      (BX_MAX_ATA_INTERFACES*2)
130
 
131
-#define BX_VIRTUAL_PORTS 1 /* normal output to Bochs ports */
132
+#define BX_VIRTUAL_PORTS 0 //ao /* normal output to Bochs ports */
133
 #define BX_DEBUG_SERIAL  0 /* output to COM1 */
134
 
135
    /* model byte 0xFC = AT */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.