mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/trampoline: Rename entrypoints
... to be more concise, and to match our other entrypoints into Xen. In acpi_sleep_prepare(), calculate bootsym_phys() once, which GCC seems unwilling to of it's own accord. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
e6dfe4250c
commit
7d6b66163b
5 files changed
+16
-14
No files matched your search
@@ -169,6 +169,7 @@ static void thaw_domains(void)
|
||||
static void acpi_sleep_prepare(u32 state)
|
||||
{
|
||||
void *wakeup_vector_va;
|
||||
paddr_t entry_pa;
|
||||
|
||||
if ( state != ACPI_STATE_S3 )
|
||||
return;
|
||||
@@ -181,10 +182,12 @@ static void acpi_sleep_prepare(u32 state)
|
||||
wakeup_vector_va = fix_to_virt(FIX_ACPI_END) +
|
||||
PAGE_OFFSET(acpi_sinfo.wakeup_vector);
|
||||
|
||||
entry_pa = bootsym_phys(entry_S3);
|
||||
|
||||
if ( acpi_sinfo.vector_width == 32 )
|
||||
*(uint32_t *)wakeup_vector_va = bootsym_phys(wakeup_start);
|
||||
*(uint32_t *)wakeup_vector_va = entry_pa;
|
||||
else
|
||||
*(uint64_t *)wakeup_vector_va = bootsym_phys(wakeup_start);
|
||||
*(uint64_t *)wakeup_vector_va = entry_pa;
|
||||
|
||||
clear_fixmap(FIX_ACPI_END);
|
||||
}
|
||||
@@ -446,7 +449,7 @@ static void tboot_sleep(u8 sleep_state)
|
||||
g_tboot_shared->acpi_sinfo.wakeup_vector = acpi_sinfo.wakeup_vector;
|
||||
g_tboot_shared->acpi_sinfo.vector_width = acpi_sinfo.vector_width;
|
||||
g_tboot_shared->acpi_sinfo.kernel_s3_resume_vector =
|
||||
bootsym_phys(wakeup_start);
|
||||
bootsym_phys(entry_S3);
|
||||
|
||||
switch ( sleep_state )
|
||||
{
|
||||
|
||||
@@ -42,10 +42,9 @@
|
||||
* do_boot_cpu() programs the Startup-IPI to point here. Due to the SIPI
|
||||
* format, the relocated entrypoint must be 4k aligned.
|
||||
*
|
||||
* It is entered in Real Mode, with %cs = trampoline_realmode_entry >> 4 and
|
||||
* %ip = 0.
|
||||
* It is entered in Real Mode, with %cs = entry_SIPI16 >> 4 and %ip = 0.
|
||||
*/
|
||||
GLOBAL(trampoline_realmode_entry)
|
||||
GLOBAL(entry_SIPI16)
|
||||
mov %cs,%ax
|
||||
mov %ax,%ds
|
||||
movb $0xA5,bootsym(trampoline_cpu_started)
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
.equ wakeup_stack, trampoline_start + PAGE_SIZE
|
||||
.local wakeup_stack
|
||||
|
||||
#define wakesym(sym) (sym - wakeup_start)
|
||||
#define wakesym(sym) (sym - entry_S3)
|
||||
|
||||
/*
|
||||
* acpi_sleep_prepare() programs the S3 wakeup vector to point here.
|
||||
*
|
||||
* The ACPI spec says that we shall be entered in Real Mode with:
|
||||
* %cs = wakeup_start >> 4
|
||||
* %ip = wakeup_start & 0xf
|
||||
* %cs = entry_S3 >> 4
|
||||
* %ip = entry_S3 & 0xf
|
||||
*
|
||||
* As wakeup_start is 16-byte aligned, %ip is 0 in practice.
|
||||
* As entry_S3 is 16-byte aligned, %ip is 0 in practice.
|
||||
*/
|
||||
ENTRY(wakeup_start)
|
||||
ENTRY(entry_S3)
|
||||
cli
|
||||
cld
|
||||
|
||||
|
||||
@@ -130,10 +130,10 @@ extern uint32_t trampoline_phys;
|
||||
#define bootsym(sym) (*((typeof(sym) *)__va(bootsym_phys(sym))))
|
||||
|
||||
/* The INIT-SIPI-SIPI entrypoint. 16-bit code. */
|
||||
void nocall trampoline_realmode_entry(void);
|
||||
void nocall entry_SIPI16(void);
|
||||
|
||||
/* The S3 wakeup vector. 16-bit code. */
|
||||
void nocall wakeup_start(void);
|
||||
void nocall entry_S3(void);
|
||||
|
||||
/*
|
||||
* A variable in the trampoline, containing Xen's physical address. Amongst
|
||||
|
||||
@@ -572,7 +572,7 @@ static int do_boot_cpu(int apicid, int cpu)
|
||||
|
||||
booting_cpu = cpu;
|
||||
|
||||
start_eip = bootsym_phys(trampoline_realmode_entry);
|
||||
start_eip = bootsym_phys(entry_SIPI16);
|
||||
|
||||
/* start_eip needs be page aligned, and below the 1M boundary. */
|
||||
if ( start_eip & ~0xff000 )
|
||||
|
||||