Messages in this thread | | | From | nathan.zook@amd ... | Subject | Memory initialiation questions--i386 | Date | Mon, 11 Oct 1999 04:43:51 -0500 |
| |
I've been looking at the memory intialization routines, and I have a couple questions. (I'm using 2.3.19 source)
First, some entries in include/asm-i386/fixmap.h confuse me. At line 73, we see this comment: "Leave one empty page between vmalloc'ed areass and the start of the fixmap, and leave one page empty at the top of mem..", followed by:
#define FIXADDR_TOP (0xffffe000UL) #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
Pages being 12 bits, this is all odd to me. If the comment is correct, why is FIXADDR_TOP 0xffffe000UL and not 0xfffff000UL? Why is it written as a numeric constant instead of (~(PAGE_SIZE -1)) ? (Or (~(PAGE_SIZE * 2 -1), if that is what is intended?)
Now __end_of_fixed_addresses is the end of the enum fixed_addresses, so it really is the count of the fixed address pages, making size right. Now in fixmap_init (/arch/i386/mm/init.c), we see that the addresses covered run from FIXADDR_START to FIXADDR_TOP. There is no appearance of an offset.
---
At the end of setup_arch, (arch/i386/kernel/setup.c) a bunch of entries are added to the iomem_resource tree. It would appear that reserved parts of memory are nodes on this tree. The entries come from a static struct resource array ram_resources, which is updated a bit before the calls are made.
I may have more reserved regions to add to the tree. Is it safe just to plop them in under the appropriate region?
- 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/
| |