Just finished installing the Cyrix patch for DLC CPUs and the unique DMA
solutions patch for AHA1542 controllers. Here is a copy of my context diff.
This patch is based on :
- ftp://sunsite.unc.edu/kernel/patches/CxPatch030.tar.z
- ftp://sunsite.unc.edu/kernel/patches/linux.cxpatch
Pre-Patch BogoMips(tm) Post-Patch BogoMips(tm)
9.47 13.31
BTW, this is the machine that was registered to Denis Solaro in the
BogoMips document. I get to babysit until August!
---- cut here ----
diff --recursive --context=10 linux-1.1.82/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S
*** linux-1.1.82/arch/i386/boot/setup.S Thu Jan 5 06:55:40 1995
--- linux/arch/i386/boot/setup.S Mon Jan 16 15:23:46 1995
***************
*** 169,188 ****
--- 169,280 ----
int 0x10 ! save it in known place, con_init fetches
mov [0],dx ! it from 0x90000.
! Get video-card data:
mov ah,#0x0f
int 0x10
mov [4],bx ! bh = display page
mov [6],ax ! al = video mode, ah = window width
+ ! Set optimal DRAM refresh rate
+ #ifdef CONFIG_BOGOBOOST
+ mov al,#0x74 ! control byte
+ out #0x43,al
+ mov al,#0x00 ! low-order data byte
+ out #0x41,al
+ mov al,#0x02 ! high-order data byte
+ out #0x41,al
+ #endif
+
+ ! Turn on Cyrix 486 Cache
+ #ifdef CONFIG_CYRIX_CPU
+ mov al,#0xc0
+ out #0x22,al ! CCR0
+ #ifdef CONFIG_CYRIX_DLC
+ # ifdef CONFIG_CYRIX_RISKY
+ # ifdef CONFIG_CYRIX_SOFTWARE_TOGGLE
+ mov al,#0x02 ! enable NC1 (may not be 100% DMA safe)
+ # else
+ mov al,#0x22 ! enable #BARB/NC1 (may not be 100% DMA safe)
+ # endif
+ # else
+ # ifdef CONFIG_CYRIX_SOFTWARE_TOGGLE
+ mov al,#0x03 ! enable NC0/NC1 for DLC
+ # else
+ mov al,#0x23 ! enable #BARB/NC0/NC1 for DLC
+ # endif
+ # endif
+ #else
+ mov al,#0x12 ! enable #FLUSH/NC1 for DRX
+ #endif
+ out #0x23,al
+
+ mov al,#0xc1
+ out #0x22,al ! CCR1
+ mov al,#0x00
+ out #0x23,al
+
+ mov al,#0xc4
+ out #0x22,al ! NCR1
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xc5
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xc6
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+
+ mov al,#0xc7
+ out #0x22,al ! NCR2
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xc8
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xc9
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+
+ mov al,#0xca
+ out #0x22,al ! NCR3
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xcb
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xcc
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+
+ mov al,#0xcd
+ out #0x22,al ! NCR4
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xce
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+ mov al,#0xcf
+ out #0x22,al
+ mov al,#0x00
+ out #0x23,al
+ #endif
+
+
! Get hd0 data
xor ax,ax ! clear ax
mov ds,ax
lds si,[4*0x41]
mov ax,#INITSEG
push ax
mov es,ax
mov di,#0x0080
mov cx,#0x10
***************
*** 215,243 ****
mov es,ax
mov di,#0x0090
mov cx,#0x10
xor ax,ax ! clear ax
cld
rep
stosb
is_disk1:
! check for PS/2 pointing device
!
mov ax,#INITSEG
mov ds,ax
mov [0x1ff],#0 ! default is no pointing device
int 0x11 ! int 0x11: equipment determination
test al,#0x04 ! check if pointing device installed
jz no_psmouse
mov [0x1ff],#0xaa ! device present
no_psmouse:
! now we want to move to protected mode ...
cli ! no interrupts allowed !
mov al,#0x80 ! disable NMI for the bootup sequence
out #0x70,al
! first we move the system to its rightful place
mov ax,#0x100 ! start of destination segment
seg cs
--- 307,340 ----
mov es,ax
mov di,#0x0090
mov cx,#0x10
xor ax,ax ! clear ax
cld
rep
stosb
is_disk1:
! check for PS/2 pointing device
! #ifndef CONFIG_BOGOBOOST
mov ax,#INITSEG
mov ds,ax
mov [0x1ff],#0 ! default is no pointing device
int 0x11 ! int 0x11: equipment determination
test al,#0x04 ! check if pointing device installed
jz no_psmouse
mov [0x1ff],#0xaa ! device present
no_psmouse:
+ #else
+ ! disable PS/2 pointing device
+
+ mov [0x1ff],#0 ! default is no pointing device
+ #endif
! now we want to move to protected mode ...
cli ! no interrupts allowed !
mov al,#0x80 ! disable NMI for the bootup sequence
out #0x70,al
! first we move the system to its rightful place
mov ax,#0x100 ! start of destination segment
seg cs
***************
*** 677,706 ****
jz l2
seg es
cmp al,(di)
l2: loope l1
cmp cx,#0x00
jne nogen
lea si,dscgenoa
lea di,mogenoa
br selmod
nogen: cld
- lea si,idoakvga
- mov di,#0x08
- mov cx,#0x08
- repe
- cmpsb
- jne nooak
- lea si,dscoakvga
- lea di,mooakvga
- br selmod
- nooak: cld
lea si,idparadise ! Check Paradise 'clues'
mov di,#0x7d
mov cx,#0x04
repe
cmpsb
jne nopara
lea si,dscparadise
lea di,moparadise
br selmod
nopara: mov dx,#0x3c4 ! Check Trident 'clues'
--- 774,793 ----
***************
*** 951,1007 ****
db 0x0d, 0x0a, 0x0a, 0x07, 0x00
modestring: .ascii " "
modenr: db 0x00 ! mode number
.ascii ": "
db 0x00
idati: .ascii "761295520"
idcandt: .byte 0xa5
idgenoa: .byte 0x77, 0x00, 0x99, 0x66
idparadise: .ascii "VGA="
- idoakvga: .ascii "OAK VGA "
idS3: .byte 0x81, 0x82, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95
.byte 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa8, 0xb0
! Manufacturer: Numofmodes+2: Mode:
! Number of modes is the number of chip-specific svga modes plus the extended
! modes available on any vga (currently 2)
moati: .byte 0x06, 0x23, 0x33, 0x22, 0x21
moahead: .byte 0x07, 0x22, 0x23, 0x24, 0x2f, 0x34
mocandt: .byte 0x04, 0x60, 0x61
mocirrus: .byte 0x06, 0x1f, 0x20, 0x22, 0x31
moeverex: .byte 0x0c, 0x03, 0x04, 0x07, 0x08, 0x0a, 0x0b, 0x16, 0x18, 0x21, 0x40
mogenoa: .byte 0x0c, 0x58, 0x5a, 0x60, 0x61, 0x62, 0x63, 0x64, 0x72, 0x74, 0x78
moparadise: .byte 0x04, 0x55, 0x54
motrident: .byte 0x09, 0x50, 0x51, 0x52, 0x57, 0x58, 0x59, 0x5a
motseng: .byte 0x07, 0x26, 0x2a, 0x23, 0x24, 0x22
movideo7: .byte 0x08, 0x40, 0x43, 0x44, 0x41, 0x42, 0x45
- mooakvga: .byte 0x08, 0x00, 0x07, 0x4e, 0x4f, 0x50, 0x51
mo_S3: .byte 0x04, 0x54, 0x55
mounknown: .byte 0x02
! msb = Cols lsb = Rows:
! The first two modes are standard vga modes available on any vga.
! mode 0 is 80x50 and mode 1 is 80x28
dscati: .word 0x5032, 0x501c, 0x8419, 0x842c, 0x641e, 0x6419
dscahead: .word 0x5032, 0x501c, 0x842c, 0x8419, 0x841c, 0xa032, 0x5042
dsccandt: .word 0x5032, 0x501c, 0x8419, 0x8432
dsccirrus: .word 0x5032, 0x501c, 0x8419, 0x842c, 0x841e, 0x6425
dsceverex: .word 0x5032, 0x501c, 0x5022, 0x503c, 0x642b, 0x644b, 0x8419, 0x842c, 0x501e, 0x641b, 0xa040, 0x841e
dscgenoa: .word 0x5032, 0x501c, 0x5020, 0x642a, 0x8419, 0x841d, 0x8420, 0x842c, 0x843c, 0x503c, 0x5042, 0x644b
dscparadise: .word 0x5032, 0x501c, 0x8419, 0x842c
dsctrident: .word 0x5032, 0x501c, 0x501e, 0x502b, 0x503c, 0x8419, 0x841e, 0x842b, 0x843c
dsctseng: .word 0x5032, 0x501c, 0x503c, 0x6428, 0x8419, 0x841c, 0x842c
dscvideo7: .word 0x5032, 0x501c, 0x502b, 0x503c, 0x643c, 0x8419, 0x842c, 0x841c
- dscoakvga: .word 0x5032, 0x501c, 0x2819, 0x5019, 0x503c, 0x843c, 0x8419, 0x842b
dsc_S3: .word 0x5032, 0x501c, 0x842b, 0x8419
dsunknown: .word 0x5032, 0x501c
modesave: .word SVGA_MODE
! This must be last
setup_sig1: .word SIG1
setup_sig2: .word SIG2
.text
endtext:
--- 1038,1091 ----
diff --recursive --context=10 linux-1.1.82/arch/i386/config.in linux/arch/i386/config.in
*** linux-1.1.82/arch/i386/config.in Mon Jan 16 15:05:43 1995
--- linux/arch/i386/config.in Mon Jan 16 15:23:46 1995
***************
*** 26,45 ****
--- 26,52 ----
bool 'PCI bios support' CONFIG_PCI n
if [ "$CONFIG_PCI" = "y" ]; then
bool ' PCI bridge optimisation (experimental)' CONFIG_PCI_OPTIMIZE n
fi
bool 'System V IPC' CONFIG_SYSVIPC y
bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
#bool 'Use -mpentium flag for Pentium-specific optimizations' CONFIG_M586 n
#if [ "$CONFIG_M586" = "n" ]; then
bool 'Use -m486 flag for 486-specific optimizations' CONFIG_M486 y
#fi
+ bool 'Enable BogoBoost refresh rate patch' CONFIG_BOGOBOOST y
+ bool 'Enable cache on Cyrix Cx486 series CPU' CONFIG_CYRIX_CPU y
+ bool 'Modify cache coherency for Cyrix Cx486DLC CPU (needed only for DLC/SLC)' CONFIG_CYRIX_DLC y
+ if [ "$CONFIG_CYRIX_DLC" = "y" ]; then
+ bool 'Try software cache control (only if you use the Adaptec 154x and no other DMA peripherals)' CONFIG_CYRIX_SOFTWARE_TOGGLE y
+ bool 'Try the alternate DLC cache setting (not safe on all machines)' CONFIG_CYRIX_RISKY n
+ fi
if [ "$CONFIG_NET" = "y" ]; then
comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" "=" "y" ]; then
bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n
bool 'IP multicasting (ALPHA)' CONFIG_IP_MULTICAST n
bool 'IP firewalling' CONFIG_IP_FIREWALL n
bool 'IP accounting' CONFIG_IP_ACCT n
comment '(it is safe to leave these untouched)'
diff --recursive --context=10 linux-1.1.82/drivers/scsi/aha1542.c linux/drivers/scsi/aha1542.c
*** linux-1.1.82/drivers/scsi/aha1542.c Mon Jan 16 15:06:07 1995
--- linux/drivers/scsi/aha1542.c Mon Jan 16 15:23:46 1995
***************
*** 101,120 ****
--- 101,128 ----
#define HOSTDATA(host) ((struct aha1542_hostdata *) &host->hostdata)
static struct Scsi_Host * aha_host[7] = {NULL,}; /* One for each IRQ level (9-15) */
#define WAITnexttimeout 3000000
...
read more »