summaryrefslogtreecommitdiffstats
path: root/sys/boot/pc98/btx
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2008-02-28 17:33:06 +0000
committernyan <nyan@FreeBSD.org>2008-02-28 17:33:06 +0000
commit0247edab67050d66c379a8c0d5ef1c5b932fcad8 (patch)
tree7542f50bad31913fade04158419f89b9e51213c7 /sys/boot/pc98/btx
parent262d6673f72f9ca7f1150d8f6d2cb061c36be7b4 (diff)
downloadFreeBSD-src-0247edab67050d66c379a8c0d5ef1c5b932fcad8.zip
FreeBSD-src-0247edab67050d66c379a8c0d5ef1c5b932fcad8.tar.gz
MFi386:
Retire the support for using paging in BTX. It hasn't been used since before 4.0.
Diffstat (limited to 'sys/boot/pc98/btx')
-rw-r--r--sys/boot/pc98/btx/btx/Makefile4
-rw-r--r--sys/boot/pc98/btx/btx/btx.S55
2 files changed, 2 insertions, 57 deletions
diff --git a/sys/boot/pc98/btx/btx/Makefile b/sys/boot/pc98/btx/btx/Makefile
index ac9a64e..59e380d 100644
--- a/sys/boot/pc98/btx/btx/Makefile
+++ b/sys/boot/pc98/btx/btx/Makefile
@@ -5,10 +5,6 @@ INTERNALPROG=
NO_MAN=
SRCS= btx.S
-.if defined(PAGING)
-CFLAGS+=-DPAGING
-.endif
-
.if defined(BOOT_BTX_NOHANG)
BOOT_BTX_FLAGS=0x1
.else
diff --git a/sys/boot/pc98/btx/btx/btx.S b/sys/boot/pc98/btx/btx/btx.S
index 043166e..7d22b27 100644
--- a/sys/boot/pc98/btx/btx/btx.S
+++ b/sys/boot/pc98/btx/btx/btx.S
@@ -25,8 +25,7 @@
.set MEM_IDT,0x1e00 # IDT
.set MEM_TSS,0x1f98 # TSS
.set MEM_MAP,0x2000 # I/O bit map
- .set MEM_DIR,0x4000 # Page directory
- .set MEM_TBL,0x5000 # Page tables
+ .set MEM_TSS_END,0x3fff # Page directory
.set MEM_ORG,0x9000 # BTX code
.set MEM_USR,0xa000 # Start of user memory
/*
@@ -86,7 +85,7 @@
.set _ESP0H,MEM_ESP0>>0x8 # Byte 1 of ESP0
.set _ESP1H,MEM_ESP1>>0x8 # Byte 1 of ESP1
.set _TSSIO,MEM_MAP-MEM_TSS # TSS I/O base
- .set _TSSLM,MEM_DIR-MEM_TSS-1 # TSS limit
+ .set _TSSLM,MEM_TSS_END-MEM_TSS # TSS limit
.set _IDTLM,MEM_TSS-MEM_IDT-1 # IDT limit
/*
* Code segment.
@@ -156,58 +155,15 @@ init.4: movb $_ESP0H,TSS_ESP0+1(%di) # Set ESP0
movb $SEL_SDATA,TSS_SS0(%di) # Set SS0
movb $_ESP1H,TSS_ESP1+1(%di) # Set ESP1
movb $_TSSIO,TSS_MAP(%di) # Set I/O bit map base
-#ifdef PAGING
-/*
- * Create page directory.
- */
- xor %edx,%edx # Page
- mov $PAG_SIZ>>0x8,%dh # size
- xor %eax,%eax # Zero
- mov $MEM_DIR,%di # Page directory
- mov $PAG_CNT>>0xa,%cl # Entries
- mov $MEM_TBL|0x7,%ax # First entry
-init.5: stosl # Write entry
- add %dx,%ax # To next
- loop init.5 # Till done
-/*
- * Create page tables.
- */
- mov $MEM_TBL,%di # Page table
- mov $PAG_CNT>>0x8,%ch # Entries
- xor %ax,%ax # Start address
-init.6: mov $0x7,%al # Set U:W:P flags
- cmp btx_hdr+0x8,%cx # Standard user page?
- jb init.7 # Yes
- cmp $PAG_CNT-MEM_BTX>>0xc,%cx # BTX memory?
- jae init.7 # No or first page
- and $~0x2,%al # Clear W flag
- cmp $PAG_CNT-MEM_USR>>0xc,%cx # User page zero?
- jne init.7 # No
- testb $0x80,btx_hdr+0x7 # Unmap it?
- jz init.7 # No
- and $~0x1,%al # Clear P flag
-init.7: stosl # Set entry
- add %edx,%eax # Next address
- loop init.6 # Till done
-#endif
/*
* Bring up the system.
*/
mov $0x2820,%bx # Set protected mode
callw setpic # IRQ offsets
lidt idtdesc # Set IDT
-#ifdef PAGING
- xor %eax,%eax # Set base
- mov $MEM_DIR>>0x8,%ah # of page
- mov %eax,%cr3 # directory
-#endif
lgdt gdtdesc # Set GDT
mov %cr0,%eax # Switch to protected
-#ifdef PAGING
- or $0x80000001,%eax # mode and enable paging
-#else
inc %ax # mode
-#endif
mov %eax,%cr0 #
ljmp $SEL_SCODE,$init.8 # To 32-bit code
.code32
@@ -882,13 +838,6 @@ intx30: cmpl $SYS_EXEC,%eax # Exec system call?
movl $MEM_USR,%eax # User base address
addl 0xc(%esp,1),%eax # Change to user
leal 0x4(%eax),%esp # stack
-#ifdef PAGING
- movl %cr0,%eax # Turn
- andl $~0x80000000,%eax # off
- movl %eax,%cr0 # paging
- xorl %eax,%eax # Flush
- movl %eax,%cr3 # TLB
-#endif
popl %eax # Call
call *%eax # program
intx30.1: orb $0x1,%ss:btx_hdr+0x7 # Flag reboot
OpenPOWER on IntegriCloud