mirror of
https://github.com/RhapsodiOS/RhapsodiOS.git
synced 2026-11-03 22:01:40 -07:00
[GH-ISSUE #6] bootloader and kernel will not work with machines that have over 512MB of RAM #4
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/RhapsodiOS#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raynorpat on GitHub (Oct 10, 2025).
Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/6
Originally assigned to: @raynorpat on GitHub.
There is a hard coded limit of 512MB in sizememory.c in boot2.
@raynorpat commented on GitHub (Oct 10, 2025):
A possible fix for this issue is in main, but needs to be tested in the wild before I close this out
@raynorpat commented on GitHub (Oct 12, 2025):
There are some additional places we need to modify the kernel to get anything over 1GB working:
a) Virtual address space in pmap.c - With 3GB of physical RAM for example, the direct mapping alone would need addresses from 0x00000000 to 0xC0000000 (3GB), which would collide with the 1GB kernel virtual address space limit (VM_MAX_KERNEL_ADDRESS at 0x40000000)
b) Page Table Allocation - The kernel attempts to pre-allocate page tables covering 6410241024 + zone_map_sizer() + buffer_map_sizer(). With 3GB RAM, this calculation would try to allocate virtual addresses beyond VM_MAX_KERNEL_ADDRESS, causing pmap_map() to panic.
c) Double Mapping - The kernel creates a double mapping where kernel memory is mapped both at low addresses (0x0 - 0x40000000) and at high addresses (0xC0000000+)
So at least some of the memory management subsystem will need to be refactored further for more RAM to be used