Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309169
b: refs/heads/master
c: 638d957
h: refs/heads/master
i:
  309167: 5edcde9
v: v3
  • Loading branch information
H. Peter Anvin committed May 16, 2012
1 parent 23510bf commit 7a70d31
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 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: 137127018812ec7fcccb9843156cfc0b5cfa31d5
refs/heads/master: 638d957b51c88852de72f15f7cd588d125e97dab
3 changes: 1 addition & 2 deletions trunk/arch/x86/include/asm/realmode.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ struct trampoline_header {
u32 gdt_base;
#else
u64 start;
u64 efer;
u32 cr4;
u32 efer_low;
u32 efer_high;
#endif
};

Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/x86/realmode/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +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;
u64 efer;
#endif

/* Has to be in very low memory so we can execute real-mode AP code. */
Expand Down Expand Up @@ -70,9 +70,8 @@ void __init setup_real_mode(void)
* 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;
rdmsrl(MSR_EFER, efer);
trampoline_header->efer = efer & ~EFER_LMA;

trampoline_header->start = (u64) secondary_startup_64;
trampoline_cr4_features = &trampoline_header->cr4;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/realmode/rm/trampoline_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ GLOBAL(trampoline_pgd) .space PAGE_SIZE
.balign 8
GLOBAL(trampoline_header)
tr_start: .space 8
GLOBAL(tr_cr4) .space 4
GLOBAL(tr_efer) .space 8
GLOBAL(tr_cr4) .space 4
END(trampoline_header)

#include "trampoline_common.S"

0 comments on commit 7a70d31

Please sign in to comment.