On 6/1/06, Vivek Goyal <[EMAIL PROTECTED]> wrote: > On Mon, May 29, 2006 at 05:40:32PM +0900, Magnus Damm wrote: > > > > >However while I agree that you need to do this in assembly for > > >control I disagree that this code should be part of the > > >relocate_new_kernel function. > > > > > >Please move the code that uses page_table_a to a separate function, > > >that when it is done jumps to the control_code page. Then you can > > >map this page both virtually and physically with a statically > > >allocated page table built a compile time. > > > > This function, you write "uses page_table_a". Do you mean that the > > function allocates it? Or fills it in? Or maybe switches to it? Please > > clarify! > > > > >This is a little simpler as you don't need to build this first > > >page table dynamically and a little clearer as you aren't trying to > > >get the control code page to serve two different functions. > > > > But doesn't a static set of pages used for page_table_a just mean that > > you are wasting valuable unswappable kernel memory? > > In your implementation, is control page swappable?
No, the control page is not swappable. Maybe I'm misunderstanding, but a "statically allocated page table" sounds like a set of pages that are compiled in the kernel. With my patch the page tables are allocated during "prepare", ie when the new kernel is loaded with the kexec tool. Until that time no extra pages are used by the kernel. This is quite different from a "statically allocated page table" which is using the pages regardless of if a new kernel is loaded or not. > >Also, how can you > > be sure that the static pages are in a DMA-safe address range? > > > > Why would kernel setup DMA on statically allocated pages? You tell me. =) My patch is using kimage_alloc_control_pages() and my code assumes that it gets DMA-safe pages from that function. If you think my code is unsafe please let me know. Maybe it's no problem but I cannot see any advantage of static page tables. I just think it is overly complex with no special reason. I'm thinking about CONFIG_PHYSICAL_START and how to always make sure the pages are in a good non-conflicting range. kimage_alloc_control_pages() already handles the range issue for us, and I'm not sure how to guarantee that for statically allocated pages. Thanks! / magnus _______________________________________________ fastboot mailing list [email protected] https://lists.osdl.org/mailman/listinfo/fastboot
