Skip to content

Commit

Permalink
Fix kernel executable code start address
Browse files Browse the repository at this point in the history
  • Loading branch information
CatMe0w committed Dec 22, 2024
1 parent 60de3eb commit 72b2365
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions loader.asm
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ _loader_start:

; Read module (ArceOS kernel) start address
mov edx, [esi] ; mod_start (physical start of kernel)
; FIXME: We load a whole unparsed ELF file, a parser is needed!!
; TODO workaround: edx will be 0x109000 (physical address) and first executable code is at 0x10a000 (phy. address)
; so at this moment we will simply +0x1000 to get the first executable code

; Workaround: edx will be 0x109000 (physical address) and first executable code is at 0x10a000 (phy. address)
; At this moment we will simply +0x1000 to get the first executable code
add edx, 0x1000

; Store mod_start as the kernel physical base address
; (we'll map this to 0xFFFFFF8000200000 later)
Expand Down

0 comments on commit 72b2365

Please sign in to comment.