Commit 17d57a9206b4de6ad082ac9f2d2346985abbd2aa
Committed by
Ingo Molnar
1 parent
0c1b272406
x86: fix x86-32 early fixmap initialization.
pageexec@freemail.hu writes: > i've just noticed that the chunk in i386/kernel/head.S ended up in a > weird place, namely, it's not going to be executed as it's just after > a 'jmp 3f' and before startup_32_smp, probably not what you intended. > on a sidenote, the whole thing can be done in a single insn, like: > > movl $(swapper_pg_pmd - __PAGE_OFFSET + 0x067), (swapper_pg_dir - > __PAGE_OFFSET+ 4092) Thanks for the reminder I thought we had fixed this problem a while ago. Needed to get fixed virtual address for USB debug and earlycon with mmio. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 1 changed file with 6 additions and 6 deletions Side-by-side Diff
arch/x86/kernel/head_32.S
... | ... | @@ -193,6 +193,12 @@ |
193 | 193 | jb 10b |
194 | 194 | movl %edi,(init_pg_tables_end - __PAGE_OFFSET) |
195 | 195 | |
196 | + /* Do an early initialization of the fixmap area */ | |
197 | + movl $(swapper_pg_dir - __PAGE_OFFSET), %edx | |
198 | + movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax | |
199 | + addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ | |
200 | + movl %eax, 4092(%edx) | |
201 | + | |
196 | 202 | xorl %ebx,%ebx /* This is the boot CPU (BSP) */ |
197 | 203 | jmp 3f |
198 | 204 | /* |
... | ... | @@ -207,12 +213,6 @@ |
207 | 213 | #ifndef CONFIG_HOTPLUG_CPU |
208 | 214 | .section .init.text,"ax",@progbits |
209 | 215 | #endif |
210 | - | |
211 | - /* Do an early initialization of the fixmap area */ | |
212 | - movl $(swapper_pg_dir - __PAGE_OFFSET), %edx | |
213 | - movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax | |
214 | - addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ | |
215 | - movl %eax, 4092(%edx) | |
216 | 216 | |
217 | 217 | #ifdef CONFIG_SMP |
218 | 218 | ENTRY(startup_32_smp) |