From dee639968b8e4c6c1806c0246d893606fcfcde87 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 4 Feb 2023 19:18:25 +0000 Subject: [PATCH] x86_64: remove vga functions from start_32 and start_64 --- arch/x86_64/start_32.S | 5 ---- arch/x86_64/start_64.S | 61 ------------------------------------------ 2 files changed, 66 deletions(-) diff --git a/arch/x86_64/start_32.S b/arch/x86_64/start_32.S index 49a02f3..aafd37a 100644 --- a/arch/x86_64/start_32.S +++ b/arch/x86_64/start_32.S @@ -283,11 +283,6 @@ _start: cpuid btl $3, %edx - mov $0xb8000, %eax - movb $76, (%eax) - inc %eax - movb $0xF, (%eax) - call init_page_tables call long_mode_switch # calls start_64, does not return diff --git a/arch/x86_64/start_64.S b/arch/x86_64/start_64.S index 87adb24..ed6a365 100644 --- a/arch/x86_64/start_64.S +++ b/arch/x86_64/start_64.S @@ -4,71 +4,10 @@ .section .boot.rodata, "a", @progbits -/******* - ERROR MESSAGE STRINGS - *******/ -kernel_identifier: - .asciz " Socks kernel version " BUILD_ID " " - - -.section .boot.text, "ax", @progbits - -vga_clear: - mov $0xb8000, %rdi # VGA buffer - mov $1000, %rcx # 4,000 bytes to clear = 2,000 words - mov $0x0700, %rax - - rep stosw - - ret - -# prints a block message showing the kernel name and version number -# starting at cell 2x1 on the VGA display -print_kernel_identifier: - /* line 1: empty padding line */ - mov $kernel_identifier, %rsi - mov $0xb80a4, %rdi - -1: - movw $0x7000, (%rdi) # black text on white background. - add $0x02, %rdi - inc %rsi - cmpb $0, (%rsi) - jne 1b - - /* line 2: kernel identiifer */ - mov $kernel_identifier, %rsi - mov $0xb8144, %rdi - -2: - movsb - movb $0x70, (%rdi) # black text on white background - inc %rdi - cmpb $0, (%rsi) - jne 2b - - - /* line 3: empty padding line */ - mov $kernel_identifier, %rsi - mov $0xb81e4, %rdi - -3: - movw $0x7000, (%rdi) # black text on white background. - add $0x02, %rdi - inc %rsi - cmpb $0, (%rsi) - jne 3b - ret - - .global start_64 .type start_64, @function start_64: - call vga_clear - pop %rax - call print_kernel_identifier - call kernel_init cli