Bootloader: Add .data section

This commit is contained in:
2024-01-12 19:25:07 +02:00
parent 7adc7e55a5
commit 7e36a0be75
13 changed files with 40 additions and 26 deletions

View File

@@ -156,6 +156,8 @@ enable_a20:
popw %ax
ret
.section .data
a20_line_disabled_msg:
.asciz "A20 line disabled. Trying to enable it"

View File

@@ -143,6 +143,8 @@ enter_unreal_mode:
ret
.section .data
hello_msg:
.asciz "This is banan-os bootloader"

View File

@@ -74,6 +74,8 @@ read_user_command_line:
ret
.section .data
command_line_enter_msg:
.asciz "cmdline: "

View File

@@ -470,6 +470,7 @@ print_root_partition_info:
popw %ax
ret
.section .data
# These will be patched during bootloader installation
root_disk_guid:

View File

@@ -196,6 +196,7 @@ elf_read_kernel_to_memory:
movw $elf_read_kernel_to_memory_not_loadable_header_msg, %si
jmp print_and_halt
.section .data
elf_validate_file_header_invalid_magic_msg:
.asciz "ELF: file has invalid ELF magic"

View File

@@ -692,6 +692,7 @@ ext2_find_kernel:
movw $ext2_kernel_not_reg_msg, %si
jmp print_and_halt
.section .data
kernel_path:
.short kernel_path1
@@ -704,7 +705,6 @@ kernel_path2:
.short 15
.asciz "banan-os.kernel"
root_partition_does_not_fit_ext2_filesystem_msg:
.asciz "Root partition is too small to contain ext2 filesystem"
root_partition_has_invalid_ext2_magic_msg:

View File

@@ -185,6 +185,7 @@ vesa_set_video_mode:
popw %ax
ret
.section .data
vesa_error_msg:
.asciz "VESA error"

View File

@@ -8,6 +8,8 @@ SECTIONS
. = ALIGN(512);
stage2_start = .;
.stage2 : { *(.stage2) }
. = ALIGN(512);
.data : { *(.data) }
stage2_end = .;
. = ALIGN(512);

View File

@@ -114,6 +114,7 @@ print_memory_map:
ret
.section .data
memory_map_msg:
.asciz "memmap:"