Skip to content

Commit

Permalink
Kernel: Move super_pages section into the bottom 16MB
Browse files Browse the repository at this point in the history
This ensures that pages returned by
MM.allocate_supervisor_physical_page() have a physical address that
is in the bottom 16MB and can thus be used by the SB16 driver for DMA.

Fixes SerenityOS#8092.
  • Loading branch information
gunnarbeutner authored and awesomekling committed Jun 17, 2021
1 parent b007898 commit 017c5fc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Kernel/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ SECTIONS

start_of_kernel_image = .;

.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE)
.boot ALIGN(4K) : AT (ADDR(.boot) - KERNEL_VIRTUAL_BASE)
{
$<TARGET_OBJECTS:boot>
*(.multiboot)
}

.super_pages ALIGN(4K) : AT (ADDR(.super_pages) - KERNEL_VIRTUAL_BASE)
{
*(.super_pages)
}

.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE)
{
start_of_kernel_text = .;

start_of_safemem_text = .;
Expand Down Expand Up @@ -70,8 +79,6 @@ SECTIONS

. = ALIGN(4K);
*(.heap)
. = ALIGN(4K);
*(.super_pages)
}

end_of_kernel_image = .;
Expand Down

0 comments on commit 017c5fc

Please sign in to comment.