Re: Memory Started not at 0x00000000

From: NIIBE Yutaka (gniibe@chroot.org)
Date: Tue Feb 08 2000 - 19:28:14 EST


Hello!

Roman Zippel wrote:
> I would suggest to change init_bootmem(), too, AFAIK the default of zero
> is only for i386 helpful, all other have to fiddle with the mem node
> interface and IMO we shouldn't begin to mix them if it's not really
> necessary. I don't know if it's too late for this, but maybe we should
> rename the *_core() functions into *_node() functions and make the other
> ones small special inline functions that call the generic versions. That
> would remove the bulk of (IMO unnecessary) small functions at the end of
> bootmem.c

It'd be good idea. Besides, I'm always confused by the mix of
absolute address and PFN. If I remember correctly, Ingo once has tidy
up the interface. It seems that it's good chance to define good
interface.

> BTW did someone try the patch below? This make a mm mapping possible,
> where several physical memory chunks are mapped together in one single
> virtual mapping (like we do it currently on m68k). If it doesn't break
> anything, it could be integrated?

> @@ -624,7 +624,7 @@
>
> void __init free_area_init(unsigned int *zones_size)
> {
> - free_area_init_core(0, NODE_DATA(0), &mem_map, zones_size, 0);
> + free_area_init_core(0, NODE_DATA(0), &mem_map, zones_size, PAGE_OFFSET);
> }
>
> static int __init setup_mem_frac(char *str)

Well, it seems that you are using mm tricks mapping physical memory
start address to virtual address PAGE_OFFSET. It can't be applicable
to SuperH architecture (or MIPS, I believe). For SuperH, the kernel
space mapping are done with *no* TLB lookup, but just mask the
address. I don't know if it is usual or not for the MIPS architecture
where memory starts not at 0x00000000, but for SuperH, main memory start
not at 0x00000000. For example, my evaluation board of SH-3 it starts
at 0x0c000000, and evaluation board of SH-4 it start at 0x08000000.

Regards,

-- 
Niibe Yutaka

- 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/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:14 EST