Skip to content

Commit 0d4e502

Browse files
authored
Merge pull request #506 from aaronzper/to-merge
Document physical memory mapping size
2 parents 6fa89e7 + aee3504 commit 0d4e502

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

api/src/config.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,16 @@ pub struct Mappings {
386386
pub boot_info: Mapping,
387387
/// Specifies the mapping of the frame buffer memory region.
388388
pub framebuffer: Mapping,
389-
/// The bootloader supports to map the whole physical memory into the virtual address
389+
/// The bootloader supports mapping the whole physical memory into the virtual address
390390
/// space at some offset. This is useful for accessing and modifying the page tables set
391391
/// up by the bootloader.
392392
///
393+
/// This mapping will go from physical address `0x0` to whichever is larger:
394+
/// - The end of the last region in the BIOS/UEFI memory map
395+
/// - The address `0x1_0000_0000` (such that at least 4 GiB of physical memory are always mapped).
396+
/// This is to ensure that useful MMIO regions (local APIC, I/O APIC, PCI bars) are
397+
/// accessible to the kernel even if less physical memory than that is on the system.
398+
///
393399
/// Defaults to `None`, i.e. no mapping of the physical memory.
394400
pub physical_memory: Option<Mapping>,
395401
/// As an alternative to mapping the whole physical memory (see [`Self::physical_memory`]),

0 commit comments

Comments
 (0)