Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309166
b: refs/heads/master
c: 7960387
h: refs/heads/master
v: v3
  • Loading branch information
H. Peter Anvin committed May 16, 2012
1 parent b6248a4 commit 42d9ced
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 34d0b02e08470c56a411ba6da1f377bc6da02826
refs/heads/master: 796038799a72adb279d785c9154df6eeb98b6e8d
11 changes: 8 additions & 3 deletions trunk/arch/x86/kernel/realmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ void __init setup_real_mode(void)
size_t size = PAGE_ALIGN(real_mode_blob_end - real_mode_blob);
#ifdef CONFIG_X86_64
u64 *trampoline_pgd;
u32 efer_low, efer_high;
#endif

/* Has to be in very low memory so we can execute real-mode AP code. */
Expand Down Expand Up @@ -65,9 +66,13 @@ void __init setup_real_mode(void)
trampoline_header->gdt_limit = __BOOT_DS + 7;
trampoline_header->gdt_base = __pa(boot_gdt);
#else
if (rdmsr_safe(MSR_EFER, &trampoline_header->efer_low,
&trampoline_header->efer_high))
BUG();
/*
* Some AMD processors will #GP(0) if EFER.LMA is set in WRMSR
* so we need to mask it out.
*/
rdmsr(MSR_EFER, efer_low, efer_high);
trampoline_header->efer_low = efer_low & ~EFER_LMA;
trampoline_header->efer_high = efer_high;

trampoline_header->start = (u64) secondary_startup_64;
trampoline_cr4_features = &trampoline_header->cr4;
Expand Down

0 comments on commit 42d9ced

Please sign in to comment.