x86_64: remove vga functions from start_32 and start_64

This commit is contained in:
2023-02-04 19:18:25 +00:00
parent 31cb7aab8b
commit dee639968b
2 changed files with 0 additions and 66 deletions

View File

@@ -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

View File

@@ -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