diff -urN freebios-cvs/util/ADLO/Makefile freebios-vga/util/ADLO/Makefile --- freebios-cvs/util/ADLO/Makefile 2002-11-25 11:07:53.000000000 +0900 +++ freebios-vga/util/ADLO/Makefile 2003-05-14 03:58:24.000000000 +0900 @@ -12,6 +12,7 @@ PIRQ_M=pirq/pirq-MS7308E.bin PIRQ_P=pirq/pirq-P6STMT.bin PIRQ_T=pirq/pirq-ThinkPad.T23.bin +PIRQ_EPIA=pirq/pirq-EPIA.bin BOCHS_R=bochs BOCHS_B=bochs/bios @@ -25,6 +26,7 @@ VIDEO64W=video/video.bios-WINFAST64kb.bin VIDEO64M= VIDEO64P=video/video.bios-P6STMT-64kb.bin +VIDEO64EPIA=video/video.bios-EPIA-64kb.bin PAYLOAD=payload @@ -37,7 +39,7 @@ #------------------------------------------------- build: loader.o bios - cat ${ELF129} ${LOADER} ${PIRQ_M} ${BIOS_B} ${VIDEO64P} > ${PAYLOAD} + cat ${ELF129} ${LOADER} ${PIRQ_EPIA} ${BIOS_B} ${VIDEO64EPIA} > ${PAYLOAD} #------------------------------------------------- Binary files freebios-cvs/util/ADLO/bochs/bios/rombios.bin and freebios-vga/util/ADLO/bochs/bios/rombios.bin differ diff -urN freebios-cvs/util/ADLO/bochs/bios/rombios.c freebios-vga/util/ADLO/bochs/bios/rombios.c --- freebios-cvs/util/ADLO/bochs/bios/rombios.c 2002-11-25 11:07:53.000000000 +0900 +++ freebios-vga/util/ADLO/bochs/bios/rombios.c 2003-05-14 04:34:10.000000000 +0900 @@ -1424,18 +1424,78 @@ pop bp ASM_END } - - void + +#define SERIAL_DEBUG + +#ifdef SERIAL_DEBUG + +/* Data */ +#define UART_RBR 0x00 +#define UART_TBR 0x00 + +/* Control */ +#define UART_IER 0x01 +#define UART_IIR 0x02 +#define UART_FCR 0x02 +#define UART_LCR 0x03 +#define UART_MCR 0x04 +#define UART_DLL 0x00 +#define UART_DLM 0x01 + +/* Status */ +#define UART_LSR 0x05 +#define UART_MSR 0x06 +#define UART_SCR 0x07 + +int uart_can_tx_byte(base_port) + Bit16u base_port; +{ + return inb(base_port + UART_LSR) & 0x20; +} + +void uart_wait_to_tx_byte(base_port) + Bit16u base_port; +{ + while(!uart_can_tx_byte(base_port)) + ; +} + +void uart_wait_until_sent(base_port) + Bit16u base_port; +{ + while(!(inb(base_port + UART_LSR) & 0x40)) + ; +} + +void uart_tx_byte(base_port, data) + Bit16u base_port; + Bit8u data; +{ + uart_wait_to_tx_byte(base_port); + outb(base_port + UART_TBR, data); + /* Make certain the data clears the fifos */ + uart_wait_until_sent(base_port); +} + +#endif + +void send(action, c) Bit16u action; Bit8u c; { + +#ifdef SERIAL_DEBUG // hcyun + if ( c == '\n') uart_tx_byte(0x3f8, '\r'); + uart_tx_byte(0x3f8, c); +#else if (action & BIOS_PRINTF_DEBUG) outb(DEBUG_PORT, c); if (action & BIOS_PRINTF_INFO) outb(INFO_PORT, c); if (action & BIOS_PRINTF_SCREEN) { if (c == '\n') wrch('\r'); wrch(c); - } + } +#endif } void Binary files freebios-cvs/util/ADLO/loader.o and freebios-vga/util/ADLO/loader.o differ diff -urN freebios-cvs/util/ADLO/loader.s freebios-vga/util/ADLO/loader.s --- freebios-cvs/util/ADLO/loader.s 2002-11-25 11:07:53.000000000 +0900 +++ freebios-vga/util/ADLO/loader.s 2003-05-14 14:39:05.000000000 +0900 @@ -50,13 +50,13 @@ ;***************************************************** ; B) shadow - ON (enable/read/write) -mov eax, #0x80000070 -mov dx, #0x0cf8 -out dx, eax - -mov eax, #0xFFFFFFFF -mov dx, #0x0cfc -out dx, eax +;mov eax, #0x80000070 +;mov dx, #0x0cf8 +;out dx, eax +; +;mov eax, #0xFFFFFFFF +;mov dx, #0x0cfc +;out dx, eax ;***************************************************** nop @@ -166,14 +166,14 @@ ;***************************************************** ; E) shadow - OFF (write) -mov eax, #0x80000070 -mov dx, #0x0cf8 -out dx, eax - -;mov eax, #0xFFFFFFFF -mov eax, #0x0000FFFF -mov dx, #0x0cfc -out dx, eax +;mov eax, #0x80000070 +;mov dx, #0x0cf8 +;out dx, eax +; +;;mov eax, #0xFFFFFFFF +;mov eax, #0x0000FFFF +;mov dx, #0x0cfc +;out dx, eax ;***************************************************** nop @@ -262,14 +262,17 @@ ; 077F - 10 = 07 6F ; 07 6F - 00 F0 = 06 7F +; for EPIA with 64MB RAM and 8MB frame buffer +; 0370 - 00F0 = 02 80 + mov al, #0x35 ;; cmos_reg out 0x70, al -mov al, #0x06 ;; val +mov al, #0x02 ;; val out 0x71, al mov al, #0x34 ;; cmos_reg out 0x70, al -mov al, #0x7F ;; val +mov al, #0x80 ;; val out 0x71, al mov al, #0x31 ;; cmos_reg Binary files freebios-cvs/util/ADLO/payload and freebios-vga/util/ADLO/payload differ Binary files freebios-cvs/util/ADLO/pirq/pirq-EPIA.bin and freebios-vga/util/ADLO/pirq/pirq-EPIA.bin differ Binary files freebios-cvs/util/ADLO/video/video.bios-EPIA-64kb.bin and freebios-vga/util/ADLO/video/video.bios-EPIA-64kb.bin differ