Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9b77ccb authored by Jarkko Sakkinen's avatar Jarkko Sakkinen Committed by H. Peter Anvin
Browse files

x86, realmode: Move ACPI wakeup to unified realmode code



Migrated ACPI wakeup code to the real-mode blob.
Code existing in .x86_trampoline  can be completely
removed. Static descriptor table in wakeup_asm.S is
courtesy of H. Peter Anvin.

Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-7-git-send-email-jarkko.sakkinen@intel.com


Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 48927bbb
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -29,7 +29,6 @@
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/mmu.h>
#include <asm/mpspec.h>
#include <asm/mpspec.h>
#include <asm/trampoline.h>


#define COMPILER_DEPENDENT_INT64   long long
#define COMPILER_DEPENDENT_INT64   long long
#define COMPILER_DEPENDENT_UINT64  unsigned long long
#define COMPILER_DEPENDENT_UINT64  unsigned long long
@@ -118,7 +117,6 @@ static inline void acpi_disable_pci(void)
extern int acpi_suspend_lowlevel(void);
extern int acpi_suspend_lowlevel(void);


extern const unsigned char acpi_wakeup_code[];
extern const unsigned char acpi_wakeup_code[];
#define acpi_wakeup_address (__pa(TRAMPOLINE_SYM(acpi_wakeup_code)))


/* early initialization routine */
/* early initialization routine */
extern void acpi_reserve_wakeup_memory(void);
extern void acpi_reserve_wakeup_memory(void);
+4 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,10 @@ struct real_mode_header {
	u32	level3_ident_pgt;
	u32	level3_ident_pgt;
	u32	level3_kernel_pgt;
	u32	level3_kernel_pgt;
#endif
#endif
#ifdef CONFIG_ACPI_SLEEP
	u32	wakeup_start;
	u32	wakeup_header;
#endif
} __attribute__((__packed__));
} __attribute__((__packed__));


extern struct real_mode_header real_mode_header;
extern struct real_mode_header real_mode_header;

arch/x86/include/asm/trampoline.h

deleted100644 → 0
+0 −39
Original line number Original line Diff line number Diff line
#ifndef _ASM_X86_TRAMPOLINE_H
#define _ASM_X86_TRAMPOLINE_H

#ifndef __ASSEMBLY__

#include <linux/types.h>
#include <asm/io.h>

/*
 * Trampoline 80x86 program as an array.  These are in the init rodata
 * segment, but that's okay, because we only care about the relative
 * addresses of the symbols.
 */
extern const unsigned char x86_trampoline_start [];
extern const unsigned char x86_trampoline_end   [];
extern unsigned char *x86_trampoline_base;

extern unsigned long init_rsp;
extern unsigned long initial_code;
extern unsigned long initial_gs;

extern void __init setup_trampolines(void);

extern const unsigned char trampoline_data[];
extern const unsigned char trampoline_status[];

#define TRAMPOLINE_SYM(x)						\
	((void *)(x86_trampoline_base +					\
		  ((const unsigned char *)(x) - x86_trampoline_start)))

/* Address of the SMP trampoline */
static inline unsigned long trampoline_address(void)
{
	return virt_to_phys(TRAMPOLINE_SYM(trampoline_data));
}

#endif /* __ASSEMBLY__ */

#endif /* _ASM_X86_TRAMPOLINE_H */
+0 −1
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@ obj-y += tsc.o io_delay.o rtc.o
obj-y			+= pci-iommu_table.o
obj-y			+= pci-iommu_table.o
obj-y			+= resource.o
obj-y			+= resource.o


obj-y				+= trampoline.o trampoline_$(BITS).o
obj-y				+= realmode.o
obj-y				+= realmode.o
obj-y				+= process.o
obj-y				+= process.o
obj-y				+= i387.o xsave.o
obj-y				+= i387.o xsave.o
+1 −8
Original line number Original line Diff line number Diff line
subdir-				:= realmode

obj-$(CONFIG_ACPI)		+= boot.o
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),)
ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y				+= cstate.o
obj-y				+= cstate.o
endif
endif
$(obj)/wakeup_rm.o:    $(obj)/realmode/wakeup.bin

$(obj)/realmode/wakeup.bin: FORCE
	$(Q)$(MAKE) $(build)=$(obj)/realmode
Loading