-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/s…
…cm/linux/kernel/git/tip/tip Pull x86 trampoline rework from H. Peter Anvin: "This code reworks all the "trampoline"/"realmode" code (various bits that need to live in the first megabyte of memory, most but not all of which runs in real mode at some point) in the kernel into a single object. The main reason for doing this is that it eliminates the last place in the kernel where we needed pages to be mapped RWX. This code separates all that code into proper R/RW/RX pages." Fix up conflicts in arch/x86/kernel/Makefile (mca removed next to reboot code), and arch/x86/kernel/reboot.c (reboot code moved around in one branch, modified in this one), and arch/x86/tools/relocs.c (mostly same code came in earlier due to working around the ld bugs just before the 3.4 release). Also remove stale x86-relocs entry from scripts/.gitignore as per Peter Anvin. * commit '61f5446169046c217a5479517edac3a890c3bee7': (36 commits) x86, realmode: Move end signature into header.S x86, relocs: When printing an error, say relative or absolute x86, relocs: More relocations which may end up as absolute x86, relocs: Workaround for binutils 2.22.52.0.1 section bug xen-acpi-processor: Add missing #include <xen/xen.h> acpi, bgrd: Add missing <linux/io.h> to drivers/acpi/bgrt.c x86, realmode: Change EFER to a single u64 field x86, realmode: Move kernel/realmode.c to realmode/init.c x86, realmode: Move not-common bits out of trampoline_common.S x86, realmode: Mask out EFER.LMA when saving trampoline EFER x86, realmode: Fix no cache bits test in reboot_32.S x86, realmode: Make sure all generated files are listed in targets x86, realmode: build fix: remove duplicate build x86, realmode: read cr4 and EFER from kernel for 64-bit trampoline x86, realmode: fixes compilation issue in tboot.c x86, realmode: move relocs from scripts/ to arch/x86/tools x86, realmode: header for trampoline code x86, realmode: flattened rm hierachy x86, realmode: don't copy real_mode_header x86, realmode: fix 64-bit wakeup sequence ...
- Loading branch information
Showing
59 changed files
with
774 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#ifndef _ARCH_X86_REALMODE_H | ||
#define _ARCH_X86_REALMODE_H | ||
|
||
#include <linux/types.h> | ||
#include <asm/io.h> | ||
|
||
/* This must match data at realmode.S */ | ||
struct real_mode_header { | ||
u32 text_start; | ||
u32 ro_end; | ||
/* SMP trampoline */ | ||
u32 trampoline_start; | ||
u32 trampoline_status; | ||
u32 trampoline_header; | ||
#ifdef CONFIG_X86_64 | ||
u32 trampoline_pgd; | ||
#endif | ||
/* ACPI S3 wakeup */ | ||
#ifdef CONFIG_ACPI_SLEEP | ||
u32 wakeup_start; | ||
u32 wakeup_header; | ||
#endif | ||
/* APM/BIOS reboot */ | ||
#ifdef CONFIG_X86_32 | ||
u32 machine_real_restart_asm; | ||
#endif | ||
}; | ||
|
||
/* This must match data at trampoline_32/64.S */ | ||
struct trampoline_header { | ||
#ifdef CONFIG_X86_32 | ||
u32 start; | ||
u16 gdt_pad; | ||
u16 gdt_limit; | ||
u32 gdt_base; | ||
#else | ||
u64 start; | ||
u64 efer; | ||
u32 cr4; | ||
#endif | ||
}; | ||
|
||
extern struct real_mode_header *real_mode_header; | ||
extern unsigned char real_mode_blob_end[]; | ||
|
||
extern unsigned long init_rsp; | ||
extern unsigned long initial_code; | ||
extern unsigned long initial_gs; | ||
|
||
extern unsigned char real_mode_blob[]; | ||
extern unsigned char real_mode_relocs[]; | ||
|
||
#ifdef CONFIG_X86_32 | ||
extern unsigned char startup_32_smp[]; | ||
extern unsigned char boot_gdt[]; | ||
#else | ||
extern unsigned char secondary_startup_64[]; | ||
#endif | ||
|
||
extern void __init setup_real_mode(void); | ||
|
||
#endif /* _ARCH_X86_REALMODE_H */ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
subdir- := realmode | ||
|
||
obj-$(CONFIG_ACPI) += boot.o | ||
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup_rm.o wakeup_$(BITS).o | ||
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup_$(BITS).o | ||
|
||
ifneq ($(CONFIG_ACPI_PROCESSOR),) | ||
obj-y += cstate.o | ||
endif | ||
|
||
$(obj)/wakeup_rm.o: $(obj)/realmode/wakeup.bin | ||
|
||
$(obj)/realmode/wakeup.bin: FORCE | ||
$(Q)$(MAKE) $(build)=$(obj)/realmode | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.