Re: HIGH MEMORY access

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Tue Mar 07 2000 - 03:39:42 EST


Lyle Coder wrote:
>
> Hello
> >I don't think (2) is true. All set_fixmap does is to set a PTE into
> >the kernel map, and PTEs point to physical addresses. The 1GB limitation
> >is a virtual address mapping limitation, not physical.
> >
> set_fixmap relies on __end_of_fixed_addresses which is set to 1GB, correct?
> The code checks for the address being less than __end_of_fixed_addresses. I
> beleive this is the highest memory upto which the kernel has page
> translations.
>
Hee.

I had a similar blackout when I debugged a problem in PAE36:
set_fixmap() checks that the idx entry is valid, but there are no checks
on the physical address.

AFAIK you would have to
* add a new entry to the fixmap enum in <include/asm/fixmap.h>
* call set_fixmap() before accessing the physical page.

        set_fixmap(FIX_MP_TABLE,phys_addr)

* then you access the mapped memory with

        unsigned long* ptr = fix_to_virt(FIX_MP_TABLE);
        parse_table(ptr);

But I think that kmap_atomic() is the far better solution - fixmap
entries are for frequently accessed pages, and IIRC you try to access a
MP table that required only during boot.

        struct page* tmp = mem_map+(phys_addr >> PAGE_SHIFT);
        unsigned long* ptr = kmap_atomic(tmp,KM_BOUNCE_READ);
        now_use_ptr(ptr);
        kunmap_atomic(ptr, KM_BOUNCE_READ);

Both interfaces should work immediately after paging_init().

--
	Manfred

- 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 Mar 07 2000 - 21:00:22 EST