moved stuff that is only referenced in Stage2 to stage2 bss

This commit is contained in:
2024-10-12 12:55:29 -04:00
parent 69c068f6be
commit 5a74cd86ad
2 changed files with 24 additions and 28 deletions

View File

@@ -43,13 +43,6 @@
; 0x0000000100000000 ??? ??? (whatever exists) RAM -- free for use (PAE/64bit)/More Extended memory ; 0x0000000100000000 ??? ??? (whatever exists) RAM -- free for use (PAE/64bit)/More Extended memory
; ???????????????? ??? ??? Potentially usable for memory mapped PCI devices in modern hardware (but typically not, due to backward compatibility) ; ???????????????? ??? ??? Potentially usable for memory mapped PCI devices in modern hardware (but typically not, due to backward compatibility)
; 0x2700 -> 0x28FF
%define disk_buffer 0x2700
; 0x2900 -> 0x2AFF
%define fat_buffer 0x2900
; 0x2B00 -> 0x2CFF
%define dir_buffer 0x2B00
; copy of partition table, 72 bytes ; copy of partition table, 72 bytes
%define partition_table 0x3000 %define partition_table 0x3000
%define partition_table_SIZE 72 %define partition_table_SIZE 72
@@ -64,15 +57,6 @@
%define fat32_ebpb 0x306E %define fat32_ebpb 0x306E
%define fat32_ebpb_SIZE 54 %define fat32_ebpb_SIZE 54
; FAT32 FSInfo, 512 bytes
;0x30A2
%define fat32_fsinfo 0x30B0
%define fat32_fsinfo_SIZE 512
; some stored state for the fat32 driver
;0x32A2
%define fat32_state 0x34B0
%define fat32_state_SIZE 32
; next free space is 0x32D0 ; next free space is 0x32D0
%define fat32_nc_data 0x35D0 %define fat32_nc_data 0x35D0
@@ -81,14 +65,6 @@
; lba_packet for raw_disk_read ; lba_packet for raw_disk_read
%define lba_packet 0x4000 %define lba_packet 0x4000
%define BIOSMemoryMap 0x4200
%define SteviaInfo 0x5200
; High memory addresses for loading kernel (for use with unreal mode and 32bit override)
; file load buffer at 16MB
%define HMEM_load_buffer 0x1000000
;PhysicalAddress = Segment * 16 + Offset ;PhysicalAddress = Segment * 16 + Offset
@@ -104,6 +80,10 @@
; Segement = linear >> 4 (top 16 bits) ; Segement = linear >> 4 (top 16 bits)
; offset = linear & 0x0F (low 4 bits) ; offset = linear & 0x0F (low 4 bits)
struc EarlyBootStruct_t
.lba_packet_offset resw 1
endstruc
; 20 bytes, passed to loaded kernel ; 20 bytes, passed to loaded kernel
struc SteviaInfoStruct_t struc SteviaInfoStruct_t
.MemoryMapPtr resd 1 .MemoryMapPtr resd 1

View File

@@ -472,8 +472,24 @@ STAGE2_SIG: dd 0xDEADBEEF ; Signature to mark the end of the stage
section .bss follows=.sign section .bss follows=.sign
align 512 align 512
begin_bss: begin_bss:
buffer1 resb 512
buffer2 resb 512 disk_buffer resb 512
buffer3 resb 512
buffer4 resb 512 fat_buffer resb 512
dir_buffer resb 512
fat_fsinfo resb 512
fat32_state resb FAT32_State_t_size
%define BIOSMemoryMap_SIZE 4096
BIOSMemoryMap resb 4096
SteviaInfo resd 4
align 16
stack_bottom:
stack resb 4096
stack_top:
end_bss: end_bss: