summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64/memory.c
AgeCommit message (Collapse)Author
2014-11-20pc, pc64: preserve last KB of conventional memory (might contain bios tables)cinap_lenrek
we add new function convmemsize() that returns the size of *usable* conventional memory that does some sanity checking and reserves the last KB below the top of memory pointer. this avoids lowraminit() overriding potential bios tables and sigsearch() going off the rails looking for tables at above 640K.
2014-11-15pc64: get rid of fixed 8MB INIMAP and dynamically map KZERO-end in l.scinap_lenrek
traditionally, the pc kernel mapped the first 8MB of physical address space. when the kernel size grows beyond that memory mapping, it will crash on boot and theres no checking in the build process making sure it fits. with the pc64 kernel, it is not hard to always map the whole kernel memory image from KZERO to end[], so that the kernel will always fit into the initial mapping.
2014-11-02pc, pc64: more sanity checking for lowraminit()cinap_lenrek
2014-10-18pc, pc64: allow passing RSDT pointer in *acpi= boot parameter, early ↵cinap_lenrek
bootscreeninit(), fix rampage() usage rampage() cannot be used after meminit(), so test for conf.mem[0].npage != 0 and use xalloc()/mallocalign() instead. this allows us to use vmap() early before mmuinit() which is needed for bootscreeninit() and acpi. to get memory for page tables, pc64 needs a lowraminit(). with EFI, the RSDT pointer is passed in *acpi= parameter from the efi loader. as the RSDT is ususally at the end of the physical address space (and not to be found in bios areas), we cannot KMAP() it so we need to vmap().
2014-06-01pc64: allocate palloc.pages from upagescinap_lenrek
the palloc.pages array takes arround 5% of the upages which gives us: 16GB = ~0.8GB 32GB = ~1.6GB 64GB = ~3.2GB we only have 2GB of address space above KZERO so this will not work for long. instead, pageinit() was altered to accept a preallocated memory in palloc.pages. and preallocpages() in pc64/main.c allocates the in upages memory, mapping it in the VMAP area (which has 512GB). the drawback is that we cannot poke at Page structures now from /proc/n/mem as the VMAP area is not accessible from it.
2014-05-01pc64: increase sizes of physical memory bank mapscinap_lenrek
number of bank slots in Conf.mem[4] was too small for kenjis machine, set it to maximum 16 (the size of the RAM map in pc64/memory.c). also increasing the UPA memory map to 64. the e820 map on my x200s has 31 entries and many holes. this gets rid of the "mapfree: ... losing" messages on boot.
2014-02-01add experimental pc64 kernelcinap_lenrek