Messages in this thread | | | Date | Mon, 9 Nov 1998 21:13:48 +0100 (MET) | From | Cyrille Chepelov <> | Subject | i386 boot & mm gurus' advice needed (int 0x15/0xE820 support) |
| |
Hi all,
I'm desperately trying to make Linux use int 0x15/eax=0xE820 instead of 0x15/0xE801 (if available) to detect the RAM. Two reasons for this, first to get rid of the "mem=" boot parameters when RAM is > 64Mb (might already be gone in the recent 2.1.x), second and most important, because I don't want Linux to clobber the ACPI table area, at least until I could parse it safe.
I have two problems :
* Now I can talk to the BIOS and get the SMAP correctly, but I don't see where I could pass this information from arch/i386/boot/setup.S to arch/i386/kernel/setup.c (I tried places such as 0x0FE00, (PARAM + 1024) (obviously a wrong one once I RTFM'ed Doc/i386/zero*.txt...), ( (PARAM + 2048 + 64) and reducing the cmdline buffer to 64 bytes, ...). My current system needs about 192 bytes to report the system memory address map, I think a 1 kbyte buffer would be quite safe a value. But where ? (Is the code from setup.S still visible early in setup_arch ? Would reserving a 1k buffer in setup.S and writing there do the trick ? Would it be safe for me to use data over (PARAM + 0x900), since the command line is supposed to be under 256 bytes ?)
* Once I get a nice map of the memory, I'll get several sparse blocks of usable memory, with blocks of reserved stuff (ROM, ACPI, ACPI/NVS etc...) inside, which I'll want to skip. Is mem_init() in arch/i386/mm/init.c the right place to play with ? (basically, I'd do something like : while (start_mem < end_mem) { + if (!reserved_by_the_bios(start_mem,PAGE_SIZE)) { clear_bit(PG_reserved, &mem_map[MAP_NR(start_mem)].flags); start_mem += PAGE_SIZE; + } }
Would that work ? (actually, getting away with start_low_mem and start_mem, and looping through the list of available memory runs as given by the BIOS could be an even better idea)
(additionally, the ACPI "RSD PTR " table scan looks very similar to the smp_scan_config() which takes place in the #ifdef __SMP__ block in paging_init(). Should I do a similar acpi_scan_rsd() there too, before that memory is remapped away, or can I do it later (at module initialisation, for instance) ?.
Finally, is clearing the PG_reserved bit in the ACPI memory pages (after I copy them away) enough to let the MM subsystem use them ?
Thank you very much in advance
-- Cyrille
------------------------------ Je me demande pourquoi les gens me regardent comme ça, dans le RER... les cheveux bleus, sûrement !
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |