under construction Overview of PC-98 hardware and BIOS architecture

0Contents

0 Memory map
0 CPU reset
0 I/O port
0 Constant wait
0 Hardware interruption
0 BIOS work area
0 Video system
0 Boot strap

Back to PC-98 architecture main page


0Memory map

The memory map of PC-98 is similar to that of IBM-PC. PC-98 has 640KB of conventional memory and 640KB-1MB area is used for video syste, BIOS ROM, external devices. The address space that is higher than 1MB is called extended RAM area. When physical memory size of PC-98 is counted, 0.6MB is used for the size of conventional memory instead of 1MB.

Certain external devices use 15MB-16MB address space like some ISA-bus devices. When such kind of devices are used, physical memory in this area shuld be disconnected. There are two implementation of BIOS menu for disconnecting the memory in 15-16MB area. The one is that only 15-16MB area is disconnected. The another is that all physical memory whose addres is higher than 15MB is disconnected. Most PC-98 machines use formar method, but some compatible machines by EPSON use later method. In later case, though the system has the memory at higher than 16M, system cannot use it. Even though BIOS menu supports only later method, hardware supports former one. Once the EPSON compatibles that have later method are detected, FresBSD(98) directly access their hadware to disconnect 15-16MB memory.


          00000000 +--------------+
                   |              |
                   | conventional |
                   | memory       |
                   |              |
                   |              |
                   |              |
          000a0000 +--------------+
                   | text V-RAM   |
          000a4000 +--------------+
                   |   graphic    |
                   |   V-RAM      |
                   |              |
          000c0000 +--------------+
                   |  external    |
                   |  device      |
          000e0000 +--------------+
                   |graphic V-RAM |
          000e4000 +--------------+
                   |              |
                   |   BIOS ROM   |
                   |              |
          00100000 +--------------+
                   |              |
                   | extended     |
                   | RAM          |
                   |              |
                   |              |
                   |              |
                   |              |
                   |              |
          00f00000 +--------------+
                   | external     |
                   | device (1)   |
          01000000 +--------------+
                   |              |
                   |              |
                   |              |

Back to the contents


0CPU reset

The following procedure resets CPU on all 80386 and higher CPU based machines:

        outb(0x37, 0x0f);        /* SHUT0 = 0 */
        outb(0x37, 0x0b);        /* SHUT1 = 0 */
        outb(0xf0, 0x00);        /* Activate RESET input of CPU */

Back to the contents


0I/O port

The 16-bit bus is internally divided into two 8-bit buses that correspond to higher and lower eight bits of the 16-bit bus. Most internal device whose bus size is eight bits is connected to one of the 8-bit buses. This means that I/O port address of each device is not contiguous, that is, I/O port addresses of each device is only odd number or even number. Historically, only lowest eight bits are masked, external device, therefor, can use very small size of I/O address space. Except for NEC brand device or its compatible, external device can use I/O address in the range from 0x##d0 to 0x##df (## = 0x00 - 0xff).

Back to the contents


0Constant wait

Historically, programmers have inserted several "JMP $+2" instructions in the hope that code fetches on the bus would create sufficient recovery time. However, recovery time of this instruction depends on the hardware. PC-98 machines provide the special I/O port for constant recovery time. Writing I/O port 0x5f takes 0.6 microsecond and it is not depend on each hardware.

Back to the contents


0 Hardware interruption

Hardware interruption stuff of PC-98 is very similar to that of IBM-PC. The differences between them are (1) signal from slave pic is connected on input 7 of master pic, and (2) purpose of each line is quite different.

Back to the contents


0BIOS work area

During initialization time, BIOS sets various parameters into its work area. Kernel routines require data in BIOS work area (it is called also pc98 system parameter).

The physical memoy with the range from 0x400 to 0x640 is used for this work area. Boot block of FreeBSD(98) copies the data in the BIOS work area into altanate video RAM, which start from 0xa2000. Copied BIOS work data is copied into pc98_system_parameter[0x240] by the locore.s.

Back to the contents


0Video system

PC-98 has separated character V-RAM and graphic V-RAM.
0 Text V-RAM
0 Graphic V-RAM
Graphic V-RAM is composed of four panes. The start addresses of each planes are 0xa8000, 0xb0000, 0xb8000, and 0xe0000, respectively. Eache plane is subdivided into two banks. Therefore, graphic system of PC-98 uses four 16KB sized V-RAM for one display.

Back to the contents


0Boot strap

Back to the contents


PC-98 architecture main page

my face My home page