* [PATCH 2/3]i386: early init pgt for fix virtual addr in head.S
@ 2007-05-21 5:19 Yinghai Lu
2007-06-01 19:17 ` Eric W. Biederman
0 siblings, 1 reply; 6+ messages in thread
From: Yinghai Lu @ 2007-05-21 5:19 UTC (permalink / raw)
To: Andi Kleen, Andrew Morton, Eric W. Biederman, Greg KH,
Bjorn Helgaas, Vivek Goyal
Cc: linux kernel mailing list
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
early init pgt for fix virtual addr in head.S, so can use set_fixmap
before setup_arch.
otherwise set_fixmap_nocache will not work for i386
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
[-- Attachment #2: head_s_init_fix_i386.diff --]
[-- Type: text/x-patch, Size: 727 bytes --]
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index f74dfc4..2d37850 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -168,6 +168,12 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
.section .init.text,"ax",@progbits
#endif
+ /* Do an early initialization of the fixmap area */
+ movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
+ movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
+ addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
+ movl %eax, 4092(%edx)
+
#ifdef CONFIG_SMP
ENTRY(startup_32_smp)
cld
@@ -507,6 +513,8 @@ ENTRY(_stext)
.section ".bss.page_aligned","w"
ENTRY(swapper_pg_dir)
.fill 1024,4,0
+ENTRY(swapper_pg_pmd)
+ .fill 1024,4,0
ENTRY(empty_zero_page)
.fill 4096,1,0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3]i386: early init pgt for fix virtual addr in head.S
2007-05-21 5:19 [PATCH 2/3]i386: early init pgt for fix virtual addr in head.S Yinghai Lu
@ 2007-06-01 19:17 ` Eric W. Biederman
2007-06-01 19:46 ` Yinghai Lu
0 siblings, 1 reply; 6+ messages in thread
From: Eric W. Biederman @ 2007-06-01 19:17 UTC (permalink / raw)
To: Yinghai Lu
Cc: Andi Kleen, Andrew Morton, Greg KH, Bjorn Helgaas, Vivek Goyal,
linux kernel mailing list
"Yinghai Lu" <yhlu.kernel@gmail.com> writes:
> early init pgt for fix virtual addr in head.S, so can use set_fixmap
> before setup_arch.
> otherwise set_fixmap_nocache will not work for i386
>
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Hmm. I'm wondering how my signed off by got on this one.
Maybe I did this at some point.
In any case this patch looks wrong (unless I'm completely mistaken)
because it doesn't appear to handle PAE mode.
Which is why I initialized the early page table in C, in my
last round of patches on this subject.
If we don't know the page table format doing this kind of
thing is very difficult.
Eric
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3]i386: early init pgt for fix virtual addr in head.S
2007-06-01 19:17 ` Eric W. Biederman
@ 2007-06-01 19:46 ` Yinghai Lu
2007-06-01 20:34 ` Eric W. Biederman
0 siblings, 1 reply; 6+ messages in thread
From: Yinghai Lu @ 2007-06-01 19:46 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Andi Kleen, Andrew Morton, Greg KH, Bjorn Helgaas, Vivek Goyal,
linux kernel mailing list
On 6/1/07, Eric W. Biederman <ebiederm@xmission.com> wrote:
> "Yinghai Lu" <yhlu.kernel@gmail.com> writes:
>
> > early init pgt for fix virtual addr in head.S, so can use set_fixmap
> > before setup_arch.
> > otherwise set_fixmap_nocache will not work for i386
> >
> > Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> > Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
>
> Hmm. I'm wondering how my signed off by got on this one.
> Maybe I did this at some point.
>
> In any case this patch looks wrong (unless I'm completely mistaken)
> because it doesn't appear to handle PAE mode.
>
> Which is why I initialized the early page table in C, in my
> last round of patches on this subject.
>
> If we don't know the page table format doing this kind of
> thing is very difficult.
it is from post for your usb debug port patch. so you have updated one for i386?
and x86_64 is right?
YH
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3]i386: early init pgt for fix virtual addr in head.S
2007-06-01 19:46 ` Yinghai Lu
@ 2007-06-01 20:34 ` Eric W. Biederman
2007-06-01 21:56 ` Yinghai Lu
0 siblings, 1 reply; 6+ messages in thread
From: Eric W. Biederman @ 2007-06-01 20:34 UTC (permalink / raw)
To: Yinghai Lu
Cc: Andi Kleen, Andrew Morton, Greg KH, Bjorn Helgaas, Vivek Goyal,
linux kernel mailing list
"Yinghai Lu" <yhlu.kernel@gmail.com> writes:
> On 6/1/07, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> "Yinghai Lu" <yhlu.kernel@gmail.com> writes:
>>
>> > early init pgt for fix virtual addr in head.S, so can use set_fixmap
>> > before setup_arch.
>> > otherwise set_fixmap_nocache will not work for i386
>> >
>> > Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
>> > Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
>>
>> Hmm. I'm wondering how my signed off by got on this one.
>> Maybe I did this at some point.
>>
>> In any case this patch looks wrong (unless I'm completely mistaken)
>> because it doesn't appear to handle PAE mode.
>>
>> Which is why I initialized the early page table in C, in my
>> last round of patches on this subject.
>>
>> If we don't know the page table format doing this kind of
>> thing is very difficult.
>
> it is from post for your usb debug port patch. so you have updated one for i386?
> and x86_64 is right?
Yes. I posted it to lkml, and the virtualization list, on the 30th of April.
I thought you had seen that.
I don't mind you picking up the work, I have so many other things to do.
But I did post a working version.
It wasn't merged for 2.6.22 because it was so close to the merge window
and so much other code was already in Andi queue.
If need be I can dig it up again and repost.
Eric
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3]i386: early init pgt for fix virtual addr in head.S
2007-06-01 20:34 ` Eric W. Biederman
@ 2007-06-01 21:56 ` Yinghai Lu
2007-06-01 22:27 ` Yinghai Lu
0 siblings, 1 reply; 6+ messages in thread
From: Yinghai Lu @ 2007-06-01 21:56 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Andi Kleen, Andrew Morton, Greg KH, Bjorn Helgaas, Vivek Goyal,
linux kernel mailing list
On 6/1/07, Eric W. Biederman <ebiederm@xmission.com> wrote:
>
> Yes. I posted it to lkml, and the virtualization list, on the 30th of April.
> I thought you had seen that.
>
4/30?, switch time! No computer yet.
I follow your post last year, and made it to adaptive to relocatable kernel.
for x86_64 head.S
you are using _KERNPG_TABLE + _PAGE_USER
and i found out it it is _PAGE_TABLE.===> otherwise initrd can not be loaded.
for other code for i386, you may need to dig and repost it.
for code in early_printk.c, i added some timeout control. your orginal
code will hang if client not take accept char.
two things left:
1. find port with debug device, and set it to default debug port.
Nvidia chipset has one in PCI config space. need to check other
chipset...
2. make ehci controller can work at the same time with debuge port.
YH
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-01 22:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-21 5:19 [PATCH 2/3]i386: early init pgt for fix virtual addr in head.S Yinghai Lu
2007-06-01 19:17 ` Eric W. Biederman
2007-06-01 19:46 ` Yinghai Lu
2007-06-01 20:34 ` Eric W. Biederman
2007-06-01 21:56 ` Yinghai Lu
2007-06-01 22:27 ` Yinghai Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®