realemu: ignore access to CMOS/RTC address/data registers
the kernel wont allow access to i/o ports 0x70/0x71, so ignore the access. reads return 0xFF. this fixes vesa on lenovo e540.
This commit is contained in:
parent
4547b5070c
commit
0da5888901
1 changed files with 12 additions and 0 deletions
|
@ -29,6 +29,7 @@ static int realmemfd;
|
|||
static int cputrace;
|
||||
static int porttrace;
|
||||
static Pit pit[3];
|
||||
static uchar rtcaddr;
|
||||
|
||||
static vlong pitclock;
|
||||
|
||||
|
@ -186,6 +187,12 @@ rport(void *, ulong p, int len)
|
|||
case 0x65: /* A20 gate */
|
||||
w = 1 << 2;
|
||||
break;
|
||||
case 0x70: /* RTC addr */
|
||||
w = rtcaddr;
|
||||
break;
|
||||
case 0x71: /* RTC data */
|
||||
w = 0xFF;
|
||||
break;
|
||||
case 0x80: /* extra dma registers (temp) */
|
||||
case 0x84:
|
||||
case 0x85:
|
||||
|
@ -244,6 +251,11 @@ wport(void *, ulong p, ulong w, int len)
|
|||
case 0x64: /* KB controller input buffer (ISA, EISA) */
|
||||
case 0x65: /* A20 gate (bit 2) */
|
||||
break;
|
||||
case 0x70: /* RTC addr */
|
||||
rtcaddr = w & 0xFF;
|
||||
break;
|
||||
case 0x71: /* RTC data */
|
||||
break;
|
||||
case 0x80:
|
||||
case 0x84:
|
||||
case 0x85:
|
||||
|
|
Loading…
Reference in a new issue