mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:02:44 +00:00 
			
		
		
		
	Kernel: Move Multiboot header into a separate file
This commit is contained in:
		
							parent
							
								
									19c0498ccc
								
							
						
					
					
						commit
						13e4093da4
					
				
					 4 changed files with 29 additions and 56 deletions
				
			
		
							
								
								
									
										28
									
								
								Kernel/Arch/x86/common/Boot/multiboot.S
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								Kernel/Arch/x86/common/Boot/multiboot.S
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| .code32 | ||||
| .set MULTIBOOT_MAGIC,         0x1badb002 | ||||
| .set MULTIBOOT_PAGE_ALIGN,    0x1 | ||||
| .set MULTIBOOT_MEMORY_INFO,   0x2 | ||||
| .set MULTIBOOT_VIDEO_MODE,    0x4 | ||||
| .set multiboot_flags,         MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | ||||
| .set multiboot_checksum,      -(MULTIBOOT_MAGIC + multiboot_flags) | ||||
| 
 | ||||
| .section .multiboot, "a" | ||||
| .align 4
 | ||||
| 
 | ||||
| .long MULTIBOOT_MAGIC
 | ||||
| .long multiboot_flags
 | ||||
| .long multiboot_checksum
 | ||||
| 
 | ||||
| 
 | ||||
| /* for MULTIBOOT_MEMORY_INFO */ | ||||
| .long 0x00000000    /* header_addr */ | ||||
| .long 0x00000000    /* load_addr */ | ||||
| .long 0x00000000    /* load_end_addr */ | ||||
| .long 0x00000000    /* bss_end_addr */ | ||||
| .long 0x00000000    /* entry_addr */ | ||||
| 
 | ||||
| /* for MULTIBOOT_VIDEO_MODE */ | ||||
| .long 0x00000000    /* mode_type */ | ||||
| .long 1280          /* width */ | ||||
| .long 1024          /* height */ | ||||
| .long 32            /* depth */ | ||||
|  | @ -1,31 +1,3 @@ | |||
| .set MULTIBOOT_MAGIC,         0x1badb002 | ||||
| .set MULTIBOOT_PAGE_ALIGN,    0x1 | ||||
| .set MULTIBOOT_MEMORY_INFO,   0x2 | ||||
| .set MULTIBOOT_VIDEO_MODE,    0x4 | ||||
| .set multiboot_flags,         MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | ||||
| .set multiboot_checksum,      -(MULTIBOOT_MAGIC + multiboot_flags) | ||||
| 
 | ||||
| .section .multiboot, "a" | ||||
| .align 4
 | ||||
| 
 | ||||
| .long MULTIBOOT_MAGIC
 | ||||
| .long multiboot_flags
 | ||||
| .long multiboot_checksum
 | ||||
| 
 | ||||
| 
 | ||||
| /* for MULTIBOOT_MEMORY_INFO */ | ||||
| .long 0x00000000    /* header_addr */ | ||||
| .long 0x00000000    /* load_addr */ | ||||
| .long 0x00000000    /* load_end_addr */ | ||||
| .long 0x00000000    /* bss_end_addr */ | ||||
| .long 0x00000000    /* entry_addr */ | ||||
| 
 | ||||
| /* for MULTIBOOT_VIDEO_MODE */ | ||||
| .long 0x00000000    /* mode_type */ | ||||
| .long 1280          /* width */ | ||||
| .long 1024          /* height */ | ||||
| .long 32            /* depth */ | ||||
| 
 | ||||
| .section .stack, "aw", @nobits
 | ||||
| stack_bottom: | ||||
| .skip 32768
 | ||||
|  |  | |||
|  | @ -1,32 +1,4 @@ | |||
| .code32 | ||||
| .set MULTIBOOT_MAGIC,         0x1badb002 | ||||
| .set MULTIBOOT_PAGE_ALIGN,    0x1 | ||||
| .set MULTIBOOT_MEMORY_INFO,   0x2 | ||||
| .set MULTIBOOT_VIDEO_MODE,    0x4 | ||||
| .set multiboot_flags,         MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_VIDEO_MODE | ||||
| .set multiboot_checksum,      -(MULTIBOOT_MAGIC + multiboot_flags) | ||||
| 
 | ||||
| .section .multiboot | ||||
| .align 4
 | ||||
| 
 | ||||
| .long MULTIBOOT_MAGIC
 | ||||
| .long multiboot_flags
 | ||||
| .long multiboot_checksum
 | ||||
| 
 | ||||
| 
 | ||||
| /* for MULTIBOOT_MEMORY_INFO */ | ||||
| .long 0x00000000    /* header_addr */ | ||||
| .long 0x00000000    /* load_addr */ | ||||
| .long 0x00000000    /* load_end_addr */ | ||||
| .long 0x00000000    /* bss_end_addr */ | ||||
| .long 0x00000000    /* entry_addr */ | ||||
| 
 | ||||
| /* for MULTIBOOT_VIDEO_MODE */ | ||||
| .long 0x00000000    /* mode_type */ | ||||
| .long 1280          /* width */ | ||||
| .long 1024          /* height */ | ||||
| .long 32            /* depth */ | ||||
| 
 | ||||
| .section .stack, "aw", @nobits
 | ||||
| stack_bottom: | ||||
| .skip 32768
 | ||||
|  |  | |||
|  | @ -281,6 +281,7 @@ set(KERNEL_SOURCES | |||
| set(KERNEL_SOURCES | ||||
|     ${KERNEL_SOURCES} | ||||
|     ${CMAKE_CURRENT_SOURCE_DIR}/Arch/x86/common/ASM_wrapper.cpp | ||||
|     ${CMAKE_CURRENT_SOURCE_DIR}/Arch/x86/common/Boot/multiboot.S | ||||
|     ${CMAKE_CURRENT_SOURCE_DIR}/Arch/x86/common/CPU.cpp | ||||
|     ${CMAKE_CURRENT_SOURCE_DIR}/Arch/x86/common/Interrupts.cpp | ||||
|     ${CMAKE_CURRENT_SOURCE_DIR}/Arch/x86/common/Processor.cpp | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gunnar Beutner
						Gunnar Beutner