lkml.org 
[lkml]   [2000]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: HIGH MEMORY access
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.040 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site