Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309145
b: refs/heads/master
c: c9b77cc
h: refs/heads/master
i:
  309143: d769503
v: v3
  • Loading branch information
Jarkko Sakkinen authored and H. Peter Anvin committed May 8, 2012
1 parent 3906344 commit 91f99cf
Show file tree
Hide file tree
Showing 36 changed files with 112 additions and 566 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: 48927bbb97c7d4cf343c05827ab9ac30c60678cb
refs/heads/master: c9b77ccb52a5c77233b0e557b7d4417b00ef4012
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/mpspec.h>
#include <asm/trampoline.h>

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

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

/* early initialization routine */
extern void acpi_reserve_wakeup_memory(void);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86/include/asm/realmode.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ struct real_mode_header {
u32 level3_ident_pgt;
u32 level3_kernel_pgt;
#endif
#ifdef CONFIG_ACPI_SLEEP
u32 wakeup_start;
u32 wakeup_header;
#endif
} __attribute__((__packed__));

extern struct real_mode_header real_mode_header;
Expand Down
39 changes: 0 additions & 39 deletions trunk/arch/x86/include/asm/trampoline.h

This file was deleted.

1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ obj-y += tsc.o io_delay.o rtc.o
obj-y += pci-iommu_table.o
obj-y += resource.o

obj-y += trampoline.o trampoline_$(BITS).o
obj-y += realmode.o
obj-y += process.o
obj-y += i387.o xsave.o
Expand Down
9 changes: 1 addition & 8 deletions trunk/arch/x86/kernel/acpi/Makefile
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

59 changes: 0 additions & 59 deletions trunk/arch/x86/kernel/acpi/realmode/Makefile

This file was deleted.

62 changes: 0 additions & 62 deletions trunk/arch/x86/kernel/acpi/realmode/wakeup.lds.S

This file was deleted.

33 changes: 4 additions & 29 deletions trunk/arch/x86/kernel/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
#include <asm/desc.h>
#include <asm/pgtable.h>
#include <asm/cacheflush.h>
#include <asm/realmode.h>

#include "realmode/wakeup.h"
#include "../../realmode/rm/wakeup/wakeup.h"
#include "sleep.h"

unsigned long acpi_realmode_flags;
Expand All @@ -36,41 +37,16 @@ asmlinkage void acpi_enter_s3(void)
*/
int acpi_suspend_lowlevel(void)
{
struct wakeup_header *header;
/* address in low memory of the wakeup routine. */
char *acpi_realmode;
struct wakeup_header *header =
(struct wakeup_header *) __va(real_mode_header.wakeup_header);

acpi_realmode = TRAMPOLINE_SYM(acpi_wakeup_code);

header = (struct wakeup_header *)(acpi_realmode + WAKEUP_HEADER_OFFSET);
if (header->signature != WAKEUP_HEADER_SIGNATURE) {
printk(KERN_ERR "wakeup header does not match\n");
return -EINVAL;
}

header->video_mode = saved_video_mode;

header->wakeup_jmp_seg = acpi_wakeup_address >> 4;

/*
* Set up the wakeup GDT. We set these up as Big Real Mode,
* that is, with limits set to 4 GB. At least the Lenovo
* Thinkpad X61 is known to need this for the video BIOS
* initialization quirk to work; this is likely to also
* be the case for other laptops or integrated video devices.
*/

/* GDT[0]: GDT self-pointer */
header->wakeup_gdt[0] =
(u64)(sizeof(header->wakeup_gdt) - 1) +
((u64)__pa(&header->wakeup_gdt) << 16);
/* GDT[1]: big real mode-like code segment */
header->wakeup_gdt[1] =
GDT_ENTRY(0x809b, acpi_wakeup_address, 0xfffff);
/* GDT[2]: big real mode-like data segment */
header->wakeup_gdt[2] =
GDT_ENTRY(0x8093, acpi_wakeup_address, 0xfffff);

#ifndef CONFIG_64BIT
store_gdt((struct desc_ptr *)&header->pmode_gdt);

Expand All @@ -95,7 +71,6 @@ int acpi_suspend_lowlevel(void)
header->pmode_cr3 = (u32)__pa(&initial_page_table);
saved_magic = 0x12345678;
#else /* CONFIG_64BIT */
header->trampoline_segment = trampoline_address() >> 4;
#ifdef CONFIG_SMP
stack_start = (unsigned long)temp_stack + sizeof(temp_stack);
early_gdt_descr.address =
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/acpi/sleep.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Variables and functions used by the code in sleep.c
*/

#include <asm/trampoline.h>
#include <linux/linkage.h>
#include <asm/realmode.h>

extern unsigned long saved_video_mode;
extern long saved_magic;
Expand Down
12 changes: 0 additions & 12 deletions trunk/arch/x86/kernel/acpi/wakeup_rm.S

This file was deleted.

1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/head32.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <asm/sections.h>
#include <asm/e820.h>
#include <asm/page.h>
#include <asm/trampoline.h>
#include <asm/apic.h>
#include <asm/io_apic.h>
#include <asm/bios_ebda.h>
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/head64.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <asm/sections.h>
#include <asm/kdebug.h>
#include <asm/e820.h>
#include <asm/trampoline.h>
#include <asm/bios_ebda.h>

static void __init zap_identity_mappings(void)
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <asm/proto.h>
#include <asm/bios_ebda.h>
#include <asm/e820.h>
#include <asm/trampoline.h>
#include <asm/setup.h>
#include <asm/smp.h>

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@

#include <asm/mtrr.h>
#include <asm/apic.h>
#include <asm/trampoline.h>
#include <asm/realmode.h>
#include <asm/e820.h>
#include <asm/mpspec.h>
Expand Down Expand Up @@ -918,7 +917,6 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_DEBUG "initial memory mapped : 0 - %08lx\n",
max_pfn_mapped<<PAGE_SHIFT);

setup_trampolines();
setup_real_mode();

init_gbpages();
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/x86/kernel/tboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <linux/mm.h>
#include <linux/tboot.h>

#include <asm/trampoline.h>
#include <asm/realmode.h>
#include <asm/processor.h>
#include <asm/bootparam.h>
#include <asm/pgtable.h>
Expand Down Expand Up @@ -201,7 +201,8 @@ static int tboot_setup_sleep(void)
add_mac_region(e820.map[i].addr, e820.map[i].size);
}

tboot->acpi_sinfo.kernel_s3_resume_vector = acpi_wakeup_address;
tboot->acpi_sinfo.kernel_s3_resume_vector =
real_mode_header.wakeup_start;

return 0;
}
Expand Down
Loading

0 comments on commit 91f99cf

Please sign in to comment.