Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53762
b: refs/heads/master
c: 278c0eb
h: refs/heads/master
v: v3
  • Loading branch information
Vivek Goyal authored and Andi Kleen committed May 2, 2007
1 parent 60c23bf commit 66ec018
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: 93fd755e47d7b00fa5470199cfb14cbd9ded0284
refs/heads/master: 278c0eb7f96586c02b2bfaa8e250d951919a2e6a
17 changes: 8 additions & 9 deletions trunk/arch/x86_64/kernel/head64.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,24 @@ static void __init clear_bss(void)
}

#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
#define OLD_CL_MAGIC_ADDR 0x90020
#define OLD_CL_MAGIC_ADDR 0x20
#define OLD_CL_MAGIC 0xA33F
#define OLD_CL_BASE_ADDR 0x90000
#define OLD_CL_OFFSET 0x90022
#define OLD_CL_OFFSET 0x22

static void __init copy_bootdata(char *real_mode_data)
{
int new_data;
unsigned long new_data;
char * command_line;

memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE);
new_data = *(int *) (x86_boot_params + NEW_CL_POINTER);
new_data = *(u32 *) (x86_boot_params + NEW_CL_POINTER);
if (!new_data) {
if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) {
if (OLD_CL_MAGIC != *(u16 *)(real_mode_data + OLD_CL_MAGIC_ADDR)) {
return;
}
new_data = OLD_CL_BASE_ADDR + * (u16 *) OLD_CL_OFFSET;
new_data = __pa(real_mode_data) + *(u16 *)(real_mode_data + OLD_CL_OFFSET);
}
command_line = (char *) ((u64)(new_data));
command_line = __va(new_data);
memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
}

Expand All @@ -74,7 +73,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
cpu_pda(i) = &boot_cpu_pda[i];

pda_init(0);
copy_bootdata(real_mode_data);
copy_bootdata(__va(real_mode_data));
#ifdef CONFIG_SMP
cpu_set(0, cpu_online_map);
#endif
Expand Down

0 comments on commit 66ec018

Please sign in to comment.