Opened 13 years ago

Closed 13 years ago

#406 closed defect (fixed)

ia32: init_e820_memory() might be broken

Reported by: Martin Decky Owned by: Jakub Jermář
Priority: major Milestone: 0.5.0
Component: helenos/kernel/ia32 Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

On machines with more than 3 GB of physical memory, the physical memory above 3 GB is usually remapped above 4 GB to create a "hole" in the physical address space between 3 GB and 4 GB to map hardware I/O registers to it.

As the current implementation of init_e820_memory() only truncates the 64bit physical addresses and sizes to 32bits by typecasting, the creation of the zones can be confused on IA-32 (the code would try to create zones below 4 GB for physical memory regions above 4 GB as the higher bits are simply thrown away).

This is a regression since changeset mainline,1352 as previously the 64bit addresses and sizes were explicitly truncated to sane values because of the limitations described in ticket #3.

The changeset mainline,1355 only reduces some of the symptoms of this bug, but does not address is completely.

Change History (2)

comment:1 by Jakub Jermář, 13 years ago

If the ia32 kernel is not PAE enabled, we could somehow instruct init_e820_memory() to ignore memory above 4G as it is unusable anyway.

If, one day, we support PAE on ia32, we will need to introduce a new type for handling physical addresses and let the physical memory subsystem work with it.

I assume amd64 is ok even now.

comment:2 by Jakub Jermář, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in mainline,1365

Note: See TracTickets for help on using tickets.