(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
This commit is contained in:
Satoshi Asami 1996-11-09 00:18:25 +00:00
parent 495a8f0a0a
commit 634e26af7a
10 changed files with 38 additions and 30 deletions

@ -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

@ -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

@ -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 */

@ -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

@ -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

@ -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;
}

@ -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 */
}

@ -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++)

@ -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

@ -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