Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6970
b: refs/heads/master
c: 484b90c
h: refs/heads/master
v: v3
  • Loading branch information
Vivek Goyal authored and Linus Torvalds committed Sep 5, 2005
1 parent 124b053 commit 65bd2e7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fd75ebb1a58c1a3c9e3d9fdf75ce7286b79bb74
refs/heads/master: 484b90c4b965d54037ff99b198d84cdf144f8a35
48 changes: 26 additions & 22 deletions trunk/arch/i386/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,32 @@ ENTRY(startup_32)
subl %edi,%ecx
shrl $2,%ecx
rep ; stosl
/*
* Copy bootup parameters out of the way.
* Note: %esi still has the pointer to the real-mode data.
* With the kexec as boot loader, parameter segment might be loaded beyond
* kernel image and might not even be addressable by early boot page tables.
* (kexec on panic case). Hence copy out the parameters before initializing
* page tables.
*/
movl $(boot_params - __PAGE_OFFSET),%edi
movl $(PARAM_SIZE/4),%ecx
cld
rep
movsl
movl boot_params - __PAGE_OFFSET + NEW_CL_POINTER,%esi
andl %esi,%esi
jnz 2f # New command line protocol
cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
jne 1f
movzwl OLD_CL_OFFSET,%esi
addl $(OLD_CL_BASE_ADDR),%esi
2:
movl $(saved_command_line - __PAGE_OFFSET),%edi
movl $(COMMAND_LINE_SIZE/4),%ecx
rep
movsl
1:

/*
* Initialize page tables. This creates a PDE and a set of page
Expand Down Expand Up @@ -214,28 +240,6 @@ ENTRY(startup_32_smp)
*/
call setup_idt

/*
* Copy bootup parameters out of the way.
* Note: %esi still has the pointer to the real-mode data.
*/
movl $boot_params,%edi
movl $(PARAM_SIZE/4),%ecx
cld
rep
movsl
movl boot_params+NEW_CL_POINTER,%esi
andl %esi,%esi
jnz 2f # New command line protocol
cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
jne 1f
movzwl OLD_CL_OFFSET,%esi
addl $(OLD_CL_BASE_ADDR),%esi
2:
movl $saved_command_line,%edi
movl $(COMMAND_LINE_SIZE/4),%ecx
rep
movsl
1:
checkCPUtype:

movl $-1,X86_CPUID # -1 for no CPUID initially
Expand Down

0 comments on commit 65bd2e7

Please sign in to comment.