summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1996-11-09 00:18:25 +0000
committerasami <asami@FreeBSD.org>1996-11-09 00:18:25 +0000
commitbf6d735fd02f61adac96742487d7113bc35fc006 (patch)
tree98401e6719c53eda748bd03333344ad00dd4df65 /sys/pc98
parent88aa304193d7c363e0240b19f9a06a9ab24fd3ea (diff)
downloadFreeBSD-src-bf6d735fd02f61adac96742487d7113bc35fc006.zip
FreeBSD-src-bf6d735fd02f61adac96742487d7113bc35fc006.tar.gz
(1) Update
(2) Don't depend on BOOTSEG (3) Change BOOTSEG from 0x9000 to 0x1000 Should be in 2.2. Submitted by: FreeBSD(98) Development Team
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/boot/biosboot/Makefile4
-rw-r--r--sys/pc98/boot/biosboot/bios.S8
-rw-r--r--sys/pc98/boot/biosboot/boot.c4
-rw-r--r--sys/pc98/boot/biosboot/boot.h10
-rw-r--r--sys/pc98/boot/biosboot/boot2.S2
-rw-r--r--sys/pc98/boot/biosboot/io.c20
-rw-r--r--sys/pc98/boot/biosboot/probe_keyboard.c2
-rw-r--r--sys/pc98/boot/biosboot/sys.c4
-rw-r--r--sys/pc98/boot/biosboot/table.c10
-rw-r--r--sys/pc98/boot/rawboot/Makefile4
10 files changed, 38 insertions, 30 deletions
diff --git a/sys/pc98/boot/biosboot/Makefile b/sys/pc98/boot/biosboot/Makefile
index 9cb20ed..8da7910 100644
--- a/sys/pc98/boot/biosboot/Makefile
+++ b/sys/pc98/boot/biosboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.4 1996/10/23 07:24:27 asami Exp $
+# $Id: Makefile,v 1.5 1996/11/02 10:38:25 asami Exp $
#
PROG= boot
@@ -77,7 +77,7 @@ BOOTWAIT?= 5000
#TIMEOUT?= 30000
# Location that boot2 is loaded at
-BOOTSEG= 0x9000
+BOOTSEG= 0x1000
# Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
BOOTSTACK= 0xFFF0
diff --git a/sys/pc98/boot/biosboot/bios.S b/sys/pc98/boot/biosboot/bios.S
index 996ae12..85c7a41 100644
--- a/sys/pc98/boot/biosboot/bios.S
+++ b/sys/pc98/boot/biosboot/bios.S
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:34:26 rpd
- * $Id: bios.S,v 1.5 1995/09/03 05:36:13 julian Exp $
+ * $Id: bios.S,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
*/
/*
@@ -293,16 +293,16 @@ ENTRY(memsize)
cmpb $0x01, %bl
jnz memcnv
memext:
- movb 0x11401, %al
+ movb 0xA1401 - BOOTSEG * 0x10, %al
shll $7, %eax
xorl %ebx, %ebx
- movw 0x11594, %bx
+ movw 0xA1594 - BOOTSEG * 0x10, %bx
shll $10, %ebx
addl %ebx, %eax
jmp xdone
memcnv:
- movb 0x11501, %al
+ movb 0xA1501 - BOOTSEG * 0x10, %al
andb $0x07, %al
incl %eax
shll $7, %eax
diff --git a/sys/pc98/boot/biosboot/boot.c b/sys/pc98/boot/biosboot/boot.c
index 70b4a31..31b6ff1 100644
--- a/sys/pc98/boot/biosboot/boot.c
+++ b/sys/pc98/boot/biosboot/boot.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, [92/04/03 16:51:14 rvb]
- * $Id: boot.c,v 1.5 1996/10/09 21:45:21 asami Exp $
+ * $Id: boot.c,v 1.6 1996/10/23 07:24:29 asami Exp $
*/
@@ -110,7 +110,7 @@ boot(int drive)
#ifdef PC98
for(ret = 0; ret < 2; ret ++) {
- if (*(unsigned char*)0x1155d & (1 << ret)) {
+ if (*(unsigned char*)V(0xA155d) & (1 << ret)) {
bootinfo.bi_bios_geom[ret] = get_diskinfo(ret + 0x80);
}
#else /* IBM-PC */
diff --git a/sys/pc98/boot/biosboot/boot.h b/sys/pc98/boot/biosboot/boot.h
index b17f135..4e57f2c 100644
--- a/sys/pc98/boot/biosboot/boot.h
+++ b/sys/pc98/boot/biosboot/boot.h
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:35:03 rpd
- * $Id: boot.h,v 1.3 1996/10/09 21:45:24 asami Exp $
+ * $Id: boot.h,v 1.4 1996/10/23 07:24:30 asami Exp $
*/
#include <sys/param.h>
@@ -82,6 +82,9 @@ int gets(char *buf);
int strcmp(const char *s1, const char *s2);
void bcopy(const char *from, char *to, int len);
void twiddle(void);
+#ifdef PC98
+void machine_check(void);
+#endif
/* probe_keyboard.c */
int probe_keyboard(void);
@@ -98,3 +101,8 @@ void read(char *buffer, int count);
int find(char *path);
int block_map(int file_block);
int openrd(void);
+
+#ifdef PC98
+#define V(ra) (ra - BOOTSEG * 0x10)
+#endif
+
diff --git a/sys/pc98/boot/biosboot/boot2.S b/sys/pc98/boot/biosboot/boot2.S
index de94f00..47b9a06 100644
--- a/sys/pc98/boot/biosboot/boot2.S
+++ b/sys/pc98/boot/biosboot/boot2.S
@@ -173,7 +173,7 @@ ENTRY(boot2)
#endif
#ifdef PC98
- movb 0x11584, %dl
+ movb 0xA1584 - BOOTSEG * 0x10, %dl
#endif
movzbl %dl, %edx /* discard head (%dh) and random high bits */
pushl %edx
diff --git a/sys/pc98/boot/biosboot/io.c b/sys/pc98/boot/biosboot/io.c
index 3160984..a292d45 100644
--- a/sys/pc98/boot/biosboot/io.c
+++ b/sys/pc98/boot/biosboot/io.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:35:57 rpd
- * $Id: io.c,v 1.4 1996/10/09 21:45:29 asami Exp $
+ * $Id: io.c,v 1.5 1996/10/23 07:24:32 asami Exp $
*/
#include "boot.h"
@@ -289,14 +289,14 @@ void putc(int c)
int i, pos;
if (Crtat == 0) {
- sys_type = *(unsigned char *)0x11501;
+ sys_type = *(unsigned char *)V(0xA1501);
if (sys_type & 0x08) {
- Crtat = (unsigned short *)0x50000;
+ Crtat = (unsigned short *)V(0xE0000);
crtat = Crtat;
row = 31;
col = 80;
} else {
- Crtat = (unsigned short *)0x10000;
+ Crtat = (unsigned short *)V(0xA0000);
crtat = Crtat;
row = 25;
col = 80;
@@ -347,10 +347,10 @@ void machine_check(void)
int ret;
int i;
int data = 0;
- u_char epson_machine_id = *(unsigned char *)(0x11624);
+ u_char epson_machine_id = *(unsigned char *)V(0xA1624);
/* PC98_SYSTEM_PARAMETER(0x501) */
- ret = ((*(unsigned char*)0x11501) & 0x08) >> 3;
+ ret = ((*(unsigned char*)V(0xA1501)) & 0x08) >> 3;
/* Wait V-SYNC */
while (inb(0x60) & 0x20) {}
@@ -363,7 +363,7 @@ void machine_check(void)
/* M_NORMAL, use CG window (all NEC OK) */
/* sum */
for (i = 0; i < 4; i++) {
- data += *((unsigned long*)0x14000 + i);/* 0xa4000 */
+ data += *((unsigned long*)V(0xA4000) + i);/* 0xa4000 */
}
if (data == 0x6efc58fc) { /* DA data */
ret |= M_NEC_PC98;
@@ -373,12 +373,12 @@ void machine_check(void)
ret |= (inb(0x42) & 0x20) ? M_8M : 0;
/* PC98_SYSTEM_PARAMETER(0x400) */
- if ((*(unsigned char*)0x11400) & 0x80) {
+ if ((*(unsigned char*)V(0xA1400)) & 0x80) {
ret |= M_NOTE;
}
if (ret & M_NEC_PC98) {
/* PC98_SYSTEM_PARAMETER(0x458) */
- if ((*(unsigned char*)0x11458) & 0x80) {
+ if ((*(unsigned char*)V(0xA1458)) & 0x80) {
ret |= M_H98;
} else {
ret |= M_NOT_H98;
@@ -396,5 +396,5 @@ void machine_check(void)
break;
}
}
- (*(unsigned long *)(0x11620)) = ret;
+ (*(unsigned long *)V(0xA1620)) = ret;
}
diff --git a/sys/pc98/boot/biosboot/probe_keyboard.c b/sys/pc98/boot/biosboot/probe_keyboard.c
index 3ad12a8..df87b13 100644
--- a/sys/pc98/boot/biosboot/probe_keyboard.c
+++ b/sys/pc98/boot/biosboot/probe_keyboard.c
@@ -32,7 +32,7 @@ int probe_keyboard(void)
/*
* New type (RA and later) keyboard only!
*/
- if (*(unsigned char*)0x11481 & 0x48)
+ if (*(unsigned char*)V(0xA1481) & 0x48)
return 0;
return 1; /* keyboard not found */
}
diff --git a/sys/pc98/boot/biosboot/sys.c b/sys/pc98/boot/biosboot/sys.c
index a555bdc..e7930b0 100644
--- a/sys/pc98/boot/biosboot/sys.c
+++ b/sys/pc98/boot/biosboot/sys.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:34 rpd
- * $Id: sys.c,v 1.5 1996/10/09 21:45:32 asami Exp $
+ * $Id: sys.c,v 1.6 1996/10/29 08:36:11 asami Exp $
*/
/*
@@ -274,7 +274,7 @@ openrd(void)
case 4: /* sd */
#ifdef PC98
dosdev_copy = unit | 0xa0;
- disk_equips = *(unsigned char *)0x11482;
+ disk_equips = *(unsigned char *)V(0xA1482);
sdunit = unit;
unit = 0;
for (i = 0; i < sdunit; i++)
diff --git a/sys/pc98/boot/biosboot/table.c b/sys/pc98/boot/biosboot/table.c
index 7ab5f96..2559b43 100644
--- a/sys/pc98/boot/biosboot/table.c
+++ b/sys/pc98/boot/biosboot/table.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:43 rpd
- * $Id: table.c,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
+ * $Id: table.c,v 1.2 1996/10/09 21:45:35 asami Exp $
*/
/*
@@ -86,11 +86,11 @@ struct seg_desc Gdt[] = {
{0xFFFF, RUN, RUN, 0x9E, 0x40, 0x0}, /* 0x18 : boot code */
#ifdef PC98
/*
- * The limit of boot data should be more than 0x6FFFF to save
- * BIOS parameter and EPSON machine ID into 2'nd T-VRAM, because
- * base addres is 0x90000.
+ * The limit of boot data should be more than or equal to 0x9FFFF
+ * for saving BIOS parameter and EPSON machine ID into 2'nd T-VRAM,
+ * because base address is normally 0x10000.
*/
- {0xFFFF, RUN, RUN, 0x92, 0x46, 0x0}, /* 0x20 : boot data */
+ {0xFFFF, RUN, RUN, 0x92, 0x4F, 0x0}, /* 0x20 : boot data */
#else
{0xFFFF, RUN, RUN, 0x92, 0x40, 0x0}, /* 0x20 : boot data */
#endif
diff --git a/sys/pc98/boot/rawboot/Makefile b/sys/pc98/boot/rawboot/Makefile
index dbe0837..74ce445 100644
--- a/sys/pc98/boot/rawboot/Makefile
+++ b/sys/pc98/boot/rawboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1996/09/12 11:09:14 asami Exp $
+# $Id: Makefile,v 1.2 1996/10/23 07:24:42 asami Exp $
#
PROG= boot
@@ -75,7 +75,7 @@ BOOTWAIT?= 5000
#TIMEOUT?= 30000
# Location that boot2 is loaded at
-BOOTSEG= 0x9000
+BOOTSEG= 0x1000
# Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
BOOTSTACK= 0xFFF0
OpenPOWER on IntegriCloud