Kernel: Add framebuffer information to kernel image
This commit is contained in:
parent
abc69fa3d5
commit
284a012509
|
@ -2,6 +2,10 @@
|
||||||
.set PG_READ_WRITE, 1<<1
|
.set PG_READ_WRITE, 1<<1
|
||||||
.set PG_PAGE_SIZE, 1<<7
|
.set PG_PAGE_SIZE, 1<<7
|
||||||
|
|
||||||
|
.set FB_WIDTH, 800
|
||||||
|
.set FB_HEIGHT, 600
|
||||||
|
.set FB_BPP, 32
|
||||||
|
|
||||||
#define KERNEL_OFFSET 0xFFFFFFFF80000000
|
#define KERNEL_OFFSET 0xFFFFFFFF80000000
|
||||||
#define V2P(vaddr) ((vaddr) - KERNEL_OFFSET)
|
#define V2P(vaddr) ((vaddr) - KERNEL_OFFSET)
|
||||||
|
|
||||||
|
@ -9,8 +13,8 @@
|
||||||
|
|
||||||
# multiboot2 header
|
# multiboot2 header
|
||||||
.section .multiboot, "aw"
|
.section .multiboot, "aw"
|
||||||
multiboot2_start:
|
|
||||||
.align 8
|
.align 8
|
||||||
|
multiboot2_start:
|
||||||
.long 0xE85250D6
|
.long 0xE85250D6
|
||||||
.long 0
|
.long 0
|
||||||
.long multiboot2_end - multiboot2_start
|
.long multiboot2_end - multiboot2_start
|
||||||
|
@ -21,9 +25,9 @@ multiboot2_start:
|
||||||
.short 5
|
.short 5
|
||||||
.short 0
|
.short 0
|
||||||
.long 20
|
.long 20
|
||||||
.long 800
|
.long FB_WIDTH
|
||||||
.long 600
|
.long FB_HEIGHT
|
||||||
.long 32
|
.long FB_BPP
|
||||||
|
|
||||||
# legacy start
|
# legacy start
|
||||||
.align 8
|
.align 8
|
||||||
|
@ -38,6 +42,16 @@ multiboot2_start:
|
||||||
.long 8
|
.long 8
|
||||||
multiboot2_end:
|
multiboot2_end:
|
||||||
|
|
||||||
|
.section .bananboot, "aw"
|
||||||
|
.align 8
|
||||||
|
bananboot_start:
|
||||||
|
.long 0xBABAB007
|
||||||
|
.long -(0xBABAB007 + FB_WIDTH + FB_HEIGHT + FB_BPP)
|
||||||
|
.long FB_WIDTH
|
||||||
|
.long FB_HEIGHT
|
||||||
|
.long FB_BPP
|
||||||
|
bananboot_end:
|
||||||
|
|
||||||
.section .bss, "aw", @nobits
|
.section .bss, "aw", @nobits
|
||||||
# Create stack
|
# Create stack
|
||||||
.global g_boot_stack_bottom
|
.global g_boot_stack_bottom
|
||||||
|
|
|
@ -11,6 +11,7 @@ SECTIONS
|
||||||
{
|
{
|
||||||
g_kernel_execute_start = .;
|
g_kernel_execute_start = .;
|
||||||
*(.multiboot)
|
*(.multiboot)
|
||||||
|
*(.bananboot)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
}
|
}
|
||||||
.userspace ALIGN(4K) : AT(ADDR(.userspace) - KERNEL_OFFSET)
|
.userspace ALIGN(4K) : AT(ADDR(.userspace) - KERNEL_OFFSET)
|
||||||
|
|
Loading…
Reference in New Issue