From a94dfdc952955ee7160b8ae2efa63a206c14cbb0 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 14 Dec 2022 18:31:27 +0000 Subject: [PATCH] Reformat for 8-width tabs --- arch/x86_64/start_32.S | 24 ++++++++++++------------ arch/x86_64/start_64.S | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/x86_64/start_32.S b/arch/x86_64/start_32.S index a9a44df..062c963 100644 --- a/arch/x86_64/start_32.S +++ b/arch/x86_64/start_32.S @@ -51,7 +51,7 @@ bootstrap_gdt_ptr: LONG MODE BOOTSTRAP PAGING STRUCTURES *******/ .section .boot.bss, "aw", @nobits -bootstrap_pml4t: # a single PML4T +bootstrap_pml4t: # a single PML4T .skip 0x1000 bootstrap_pdpt: # a single PDPT .skip 0x1000 @@ -197,7 +197,7 @@ init_page_tables: add $0x1000, %edi sub %ecx, %edi sub $0x08, %edi # subtract one from the index here, otherwise the mapping will be at 0xffffffffc0000000 - # (each entry in the array is 8 bytes long) + # (each entry in the array is 8 bytes long) /* %ESI is a pointer into the pagedir buffer. %EDI is a pointer into the PDPT. @@ -290,17 +290,17 @@ long_mode_switch: _start: mov $bootstrap_stack_top, %esp - push %ebx # store the pointer to the multiboot info block. + push %ebx # store the pointer to the multiboot info block. # check if long mode is supported - movl $0x80000000, %eax # Extended-function 80000000h. - cpuid # Is largest extended function - cmpl $0x80000000, %eax # any function > 80000000h? - jbe no_long_mode # If not, no long mode. - movl $0x80000001, %eax # Extended-function 80000001h. - cpuid # Now EDX = extended-features flags. - btl $29, %edx # Test if long mode is supported. - jnc no_long_mode # Exit if not supported. + movl $0x80000000, %eax # Extended-function 80000000h. + cpuid # Is largest extended function + cmpl $0x80000000, %eax # any function > 80000000h? + jbe no_long_mode # If not, no long mode. + movl $0x80000001, %eax # Extended-function 80000001h. + cpuid # Now EDX = extended-features flags. + btl $29, %edx # Test if long mode is supported. + jnc no_long_mode # Exit if not supported. movl $1, %eax cpuid @@ -312,7 +312,7 @@ _start: movb $0xF, (%eax) call init_page_tables - call long_mode_switch # calls start_64, does not return + call long_mode_switch # calls start_64, does not return cli hlt diff --git a/arch/x86_64/start_64.S b/arch/x86_64/start_64.S index 5929e5f..e511026 100644 --- a/arch/x86_64/start_64.S +++ b/arch/x86_64/start_64.S @@ -6,7 +6,7 @@ ERROR MESSAGE STRINGS *******/ kernel_identifier: - .asciz " Socks kernel version " BUILD_ID " " + .asciz " Socks kernel version " BUILD_ID " " .section .boot.text, "ax", @progbits @@ -29,7 +29,7 @@ print_kernel_identifier: 2: movsb - movb $0x70, (%rdi) # black text on white background + movb $0x70, (%rdi) # black text on white background inc %rdi cmpb $0, (%rsi) jne 2b