mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 03:10:27 +00:00
[metal] Push forward timing of VGA TTY initialization
- arrange to initialize the default VGA TTY data structure, at about the same time as the console stdin, stdout, & stderr descriptors are set up, rather than much later
This commit is contained in:
parent
7d6835c0dd
commit
bdd2d007cd
2 changed files with 8 additions and 1 deletions
|
@ -91,5 +91,12 @@
|
|||
vga_console:
|
||||
.endobj vga_console,globl,hidden
|
||||
.previous
|
||||
.init.start 305,_init_vga
|
||||
push %rdi
|
||||
push %rsi
|
||||
call _vga_init
|
||||
pop %rsi
|
||||
pop %rdi
|
||||
.init.end 305,_init_vga
|
||||
.yoink sys_writev_vga
|
||||
.yoink sys_readv_vga
|
|
@ -60,7 +60,7 @@ void _vga_reinit(struct Tty *tty, unsigned short starty, unsigned short startx,
|
|||
chr_ht, chr_wid, vid_buf, init_flags);
|
||||
}
|
||||
|
||||
__attribute__((__constructor__)) static textstartup void _vga_init(void) {
|
||||
textstartup void _vga_init(void) {
|
||||
if (IsMetal()) {
|
||||
struct mman *mm = (struct mman *)(BANE + 0x0500);
|
||||
unsigned short starty = mm->pc_video_curs_info.y,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue