diff options
Diffstat (limited to 'roms/qemu-palcode')
-rw-r--r-- | roms/qemu-palcode/Makefile | 4 | ||||
-rw-r--r-- | roms/qemu-palcode/init.c | 3 | ||||
-rw-r--r-- | roms/qemu-palcode/pal.S | 11 | ||||
-rw-r--r-- | roms/qemu-palcode/pal.h | 1 | ||||
-rw-r--r-- | roms/qemu-palcode/palcode.ld | 11 | ||||
-rw-r--r-- | roms/qemu-palcode/protos.h | 1 | ||||
-rw-r--r-- | roms/qemu-palcode/uart.c | 2 | ||||
-rw-r--r-- | roms/qemu-palcode/vgafonts.c | 6 | ||||
-rw-r--r-- | roms/qemu-palcode/vgatables.c | 2 | ||||
-rw-r--r-- | roms/qemu-palcode/vgatables.h | 14 |
10 files changed, 34 insertions, 21 deletions
diff --git a/roms/qemu-palcode/Makefile b/roms/qemu-palcode/Makefile index 93fc5f4c2..202559931 100644 --- a/roms/qemu-palcode/Makefile +++ b/roms/qemu-palcode/Makefile @@ -6,8 +6,8 @@ CORE = typhoon SYSTEM = clipper ASFLAGS = -Wa,-m21264 -Wa,--noexecstack -OPT= -Os -CFLAGS = $(OPT) -g -Wall -fvisibility=hidden -fno-strict-aliasing \ +OPT= -O2 +CFLAGS = $(OPT) -g1 -Wall -fvisibility=hidden -fno-strict-aliasing \ -msmall-text -msmall-data -mno-fp-regs -mbuild-constants CPPFLAGS = -DSYSTEM_H='"sys-$(SYSTEM).h"' diff --git a/roms/qemu-palcode/init.c b/roms/qemu-palcode/init.c index b2c4f5ae8..324bc911a 100644 --- a/roms/qemu-palcode/init.c +++ b/roms/qemu-palcode/init.c @@ -53,7 +53,8 @@ extern char _end[] __attribute__((visibility("hidden"), nocommon)); struct pcb_struct pcb __attribute__((section(".sbss"))); -static unsigned long page_dir[1024] __attribute__((aligned(PAGE_SIZE))); +static unsigned long page_dir[1024] + __attribute__((aligned(PAGE_SIZE), section(".bss.page_dir"))); /* The HWRPB must be aligned because it is exported at INIT_HWRPB. */ struct hwrpb_combine hwrpb __attribute__((aligned(PAGE_SIZE))); diff --git a/roms/qemu-palcode/pal.S b/roms/qemu-palcode/pal.S index 1d579aa5b..1befc9f4a 100644 --- a/roms/qemu-palcode/pal.S +++ b/roms/qemu-palcode/pal.S @@ -446,7 +446,7 @@ ENDFN CallPal_OpcDec08 CallPal_Cserve: // Most of the entries are densely clustered around 0. mov 0, v0 - cmpule a0, 6, p0 + cmpule a0, 7, p0 cmovne p0, a0, v0 br p0, 1f 1: lda p0, Cserve_Table-1b(p0) @@ -480,13 +480,18 @@ Cserve_Get_Alarm: ENDFN Cserve_Get_Alarm Cserve_Set_Alarm_Rel: // Cheating here: create the absolute time and fall thru. - mfpr p0, qemu_walltime + mfpr p0, qemu_vmtime addq p0, a1, a1 ENDFN Cserve_Set_Alarm_Rel Cserve_Set_Alarm_Abs: mtpr a1, qemu_alarm hw_rei ENDFN Cserve_Set_Alarm_Abs +Cserve_Get_VM_Time: + mfpr v0, qemu_vmtime + hw_rei +ENDFN Cserve_Get_VM_Time + CallPal_Cserve_Cont: // ??? For SRM compatibility and their use within Linux, use 52/53 @@ -1905,7 +1910,7 @@ Sys_EnterConsole: * Allocate the initial bootup stack. */ - .section .bss + .section .bss.stack .align 3 .globl stack .type stack,@object diff --git a/roms/qemu-palcode/pal.h b/roms/qemu-palcode/pal.h index 7642447a0..c89a18c39 100644 --- a/roms/qemu-palcode/pal.h +++ b/roms/qemu-palcode/pal.h @@ -109,6 +109,7 @@ #define qemu_halt 252 #define qemu_alarm 251 #define qemu_walltime 250 +#define qemu_vmtime 249 /* PALcode uses of the private storage slots. */ #define ptEntUna pt0 diff --git a/roms/qemu-palcode/palcode.ld b/roms/qemu-palcode/palcode.ld index 59efb0462..b525cbd20 100644 --- a/roms/qemu-palcode/palcode.ld +++ b/roms/qemu-palcode/palcode.ld @@ -6,12 +6,17 @@ SECTIONS . = 0xfffffc0000000000; .text : { *(.text*) } .rodata : { *(.rodata*) } - .data ALIGN(8192) : { *(.data.hwrpb) *(.data*) } + .data ALIGN(8192) : { *(.data*) } .got : { *(.got.plt) *(.got) } .sdata : { *(.sdata*) } .sbss : { *(.sbss) *(.scommon) } - .bss : { *(.bss) *(COMMON) } - PROVIDE (_end = .); + .bss : { + *(.bss.page_dir) + *(.bss.stack) + *(COMMON) + *(.bss) + PROVIDE (_end = .); + } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning diff --git a/roms/qemu-palcode/protos.h b/roms/qemu-palcode/protos.h index ce7a8eb42..3ed13811f 100644 --- a/roms/qemu-palcode/protos.h +++ b/roms/qemu-palcode/protos.h @@ -223,5 +223,6 @@ static inline void udelay(unsigned long msec) */ extern void ps2port_setup(void); extern void pci_setup(void); +extern void vgahw_init(void); #endif /* PROTOS_H */ diff --git a/roms/qemu-palcode/uart.c b/roms/qemu-palcode/uart.c index cf2615ee6..61e467a6f 100644 --- a/roms/qemu-palcode/uart.c +++ b/roms/qemu-palcode/uart.c @@ -139,5 +139,5 @@ uart_init_line(int offset, int baud) void uart_init(void) { uart_init_line(COM1, SERIAL_SPEED); - uart_init_line(COM2, SERIAL_SPEED); + /* uart_init_line(COM2, SERIAL_SPEED); */ } diff --git a/roms/qemu-palcode/vgafonts.c b/roms/qemu-palcode/vgafonts.c index cdfd20d10..ef59c9b31 100644 --- a/roms/qemu-palcode/vgafonts.c +++ b/roms/qemu-palcode/vgafonts.c @@ -8,7 +8,7 @@ * The package is (c) by Joseph Gil * The individual fonts are public domain */ -u8 vgafont8[256 * 8] VAR16 = { +u8 const vgafont8[256 * 8] VAR16 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e, @@ -267,7 +267,7 @@ u8 vgafont8[256 * 8] VAR16 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -u8 vgafont14[256 * 14] VAR16 = { +u8 const vgafont14[256 * 14] VAR16 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x00, 0x00, 0x00, @@ -526,7 +526,7 @@ u8 vgafont14[256 * 14] VAR16 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -u8 vgafont16[256 * 16] VAR16 = { +u8 const vgafont16[256 * 16] VAR16 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, diff --git a/roms/qemu-palcode/vgatables.c b/roms/qemu-palcode/vgatables.c index bcecf7296..8c934c054 100644 --- a/roms/qemu-palcode/vgatables.c +++ b/roms/qemu-palcode/vgatables.c @@ -417,7 +417,7 @@ find_vga_entry(u8 mode) return NULL; } -u16 video_save_pointer_table[14] VAR16; +// u16 video_save_pointer_table[14] VAR16; /**************************************************************** diff --git a/roms/qemu-palcode/vgatables.h b/roms/qemu-palcode/vgatables.h index c059efb43..153a3cc94 100644 --- a/roms/qemu-palcode/vgatables.h +++ b/roms/qemu-palcode/vgatables.h @@ -81,7 +81,7 @@ typedef uint16_t u16; #define SCREEN_MEM_START(x,y,p) SCREEN_IO_START(((x)*2),(y),(p)) /* standard BIOS Video Parameter Table */ -struct VideoParam_s { +struct __attribute__((packed)) VideoParam_s { u8 twidth; u8 theightm1; u8 cheight; @@ -91,7 +91,7 @@ struct VideoParam_s { u8 crtc_regs[25]; u8 actl_regs[20]; u8 grdc_regs[9]; -} PACKED; +}; struct vgamode_s { u8 svgamode; @@ -155,11 +155,11 @@ extern struct VideoParam_s video_param_table[]; extern u8 static_functionality[]; // vgafonts.c -extern u8 vgafont8[]; -extern u8 vgafont14[]; -extern u8 vgafont16[]; -extern u8 vgafont14alt[]; -extern u8 vgafont16alt[]; +extern const u8 vgafont8[]; +extern const u8 vgafont14[]; +extern const u8 vgafont16[]; +extern const u8 vgafont14alt[]; +extern const u8 vgafont16alt[]; // vga.c struct carattr { |