cpu/x86/smm_stub.S: Drop unused module_handler parameter
Change-Id: I15b433483c36cce04816e8895789997d91702484 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51530 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
5dfb3314b4
commit
166d2ac901
4 changed files with 5 additions and 23 deletions
|
@ -249,7 +249,6 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
|
||||||
stub_params->stack_top = (uintptr_t)stacks_top;
|
stub_params->stack_top = (uintptr_t)stacks_top;
|
||||||
stub_params->stack_size = params->per_cpu_stack_size;
|
stub_params->stack_size = params->per_cpu_stack_size;
|
||||||
stub_params->c_handler = (uintptr_t)params->handler;
|
stub_params->c_handler = (uintptr_t)params->handler;
|
||||||
stub_params->c_handler_arg = (uintptr_t)params->handler_arg;
|
|
||||||
stub_params->fxsave_area = (uintptr_t)fxsave_area;
|
stub_params->fxsave_area = (uintptr_t)fxsave_area;
|
||||||
stub_params->fxsave_area_size = FXSAVE_SIZE;
|
stub_params->fxsave_area_size = FXSAVE_SIZE;
|
||||||
stub_params->runtime.smbase = (uintptr_t)smbase;
|
stub_params->runtime.smbase = (uintptr_t)smbase;
|
||||||
|
@ -265,8 +264,8 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
|
||||||
/* Allow the initiator to manipulate SMM stub parameters. */
|
/* Allow the initiator to manipulate SMM stub parameters. */
|
||||||
params->runtime = &stub_params->runtime;
|
params->runtime = &stub_params->runtime;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "SMM Module: stub loaded at %p. Will call %p(%p)\n",
|
printk(BIOS_DEBUG, "SMM Module: stub loaded at %p. Will call %p\n",
|
||||||
smm_stub_loc, params->handler, params->handler_arg);
|
smm_stub_loc, params->handler);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -390,7 +389,6 @@ int smm_load_module(void *smram, size_t size, struct smm_loader_params *params)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
params->handler = rmodule_entry(&smm_mod);
|
params->handler = rmodule_entry(&smm_mod);
|
||||||
params->handler_arg = rmodule_parameters(&smm_mod);
|
|
||||||
|
|
||||||
return smm_module_setup_stub(smram, size, params, fxsave_area);
|
return smm_module_setup_stub(smram, size, params, fxsave_area);
|
||||||
}
|
}
|
||||||
|
|
|
@ -429,7 +429,6 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
|
||||||
stub_params->stack_top = (uintptr_t)stacks_top;
|
stub_params->stack_top = (uintptr_t)stacks_top;
|
||||||
stub_params->stack_size = params->per_cpu_stack_size;
|
stub_params->stack_size = params->per_cpu_stack_size;
|
||||||
stub_params->c_handler = (uintptr_t)params->handler;
|
stub_params->c_handler = (uintptr_t)params->handler;
|
||||||
stub_params->c_handler_arg = (uintptr_t)params->handler_arg;
|
|
||||||
stub_params->fxsave_area = (uintptr_t)fxsave_area;
|
stub_params->fxsave_area = (uintptr_t)fxsave_area;
|
||||||
stub_params->fxsave_area_size = FXSAVE_SIZE;
|
stub_params->fxsave_area_size = FXSAVE_SIZE;
|
||||||
stub_params->runtime.smbase = (uintptr_t)smbase;
|
stub_params->runtime.smbase = (uintptr_t)smbase;
|
||||||
|
@ -470,8 +469,8 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
|
||||||
/* Allow the initiator to manipulate SMM stub parameters. */
|
/* Allow the initiator to manipulate SMM stub parameters. */
|
||||||
params->runtime = &stub_params->runtime;
|
params->runtime = &stub_params->runtime;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "SMM Module: stub loaded at %p. Will call %p(%p)\n",
|
printk(BIOS_DEBUG, "SMM Module: stub loaded at %p. Will call %p\n",
|
||||||
smm_stub_loc, params->handler, params->handler_arg);
|
smm_stub_loc, params->handler);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,7 +617,6 @@ int smm_load_module(void *smram, size_t size, struct smm_loader_params *params)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
params->handler = rmodule_entry(&smm_mod);
|
params->handler = rmodule_entry(&smm_mod);
|
||||||
params->handler_arg = rmodule_parameters(&smm_mod);
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "%s: smram_start: 0x%p\n",
|
printk(BIOS_DEBUG, "%s: smram_start: 0x%p\n",
|
||||||
__func__, smram);
|
__func__, smram);
|
||||||
|
@ -630,8 +628,6 @@ int smm_load_module(void *smram, size_t size, struct smm_loader_params *params)
|
||||||
__func__, params->handler);
|
__func__, params->handler);
|
||||||
printk(BIOS_DEBUG, "%s: handler_size %zx\n",
|
printk(BIOS_DEBUG, "%s: handler_size %zx\n",
|
||||||
__func__, handler_size);
|
__func__, handler_size);
|
||||||
printk(BIOS_DEBUG, "%s: handler_arg %p\n",
|
|
||||||
__func__, params->handler_arg);
|
|
||||||
printk(BIOS_DEBUG, "%s: fxsave_area %p\n",
|
printk(BIOS_DEBUG, "%s: fxsave_area %p\n",
|
||||||
__func__, fxsave_area);
|
__func__, fxsave_area);
|
||||||
printk(BIOS_DEBUG, "%s: fxsave_size %zx\n",
|
printk(BIOS_DEBUG, "%s: fxsave_size %zx\n",
|
||||||
|
|
|
@ -21,8 +21,6 @@ stack_top:
|
||||||
.long 0
|
.long 0
|
||||||
c_handler:
|
c_handler:
|
||||||
.long 0
|
.long 0
|
||||||
c_handler_arg:
|
|
||||||
.long 0
|
|
||||||
fxsave_area:
|
fxsave_area:
|
||||||
.long 0
|
.long 0
|
||||||
fxsave_area_size:
|
fxsave_area_size:
|
||||||
|
@ -201,10 +199,10 @@ smm_trampoline32:
|
||||||
* c_handler(&arg)
|
* c_handler(&arg)
|
||||||
*/
|
*/
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
push $0x0 /* Padding */
|
||||||
push %rbx /* uintptr_t *canary */
|
push %rbx /* uintptr_t *canary */
|
||||||
push $(smm_runtime)
|
push $(smm_runtime)
|
||||||
push %rcx /* size_t cpu */
|
push %rcx /* size_t cpu */
|
||||||
push c_handler_arg /* void *arg */
|
|
||||||
|
|
||||||
mov %rsp, %rdi /* *arg */
|
mov %rsp, %rdi /* *arg */
|
||||||
|
|
||||||
|
@ -229,13 +227,9 @@ smm_trampoline32:
|
||||||
wrmsr
|
wrmsr
|
||||||
|
|
||||||
#else
|
#else
|
||||||
push $0x0 /* Padding */
|
|
||||||
push $0x0 /* Padding */
|
|
||||||
push $0x0 /* Padding */
|
|
||||||
push %ebx /* uintptr_t *canary */
|
push %ebx /* uintptr_t *canary */
|
||||||
push $(smm_runtime)
|
push $(smm_runtime)
|
||||||
push %ecx /* size_t cpu */
|
push %ecx /* size_t cpu */
|
||||||
push c_handler_arg /* void *arg */
|
|
||||||
push %esp /* smm_module_params *arg (allocated on stack). */
|
push %esp /* smm_module_params *arg (allocated on stack). */
|
||||||
mov c_handler, %eax
|
mov c_handler, %eax
|
||||||
call *%eax
|
call *%eax
|
||||||
|
|
|
@ -72,7 +72,6 @@ struct smm_runtime {
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct smm_module_params {
|
struct smm_module_params {
|
||||||
void *arg;
|
|
||||||
size_t cpu;
|
size_t cpu;
|
||||||
const struct smm_runtime *runtime;
|
const struct smm_runtime *runtime;
|
||||||
/* A canary value that has been placed at the end of the stack.
|
/* A canary value that has been placed at the end of the stack.
|
||||||
|
@ -87,7 +86,6 @@ struct smm_stub_params {
|
||||||
u32 stack_size;
|
u32 stack_size;
|
||||||
u32 stack_top;
|
u32 stack_top;
|
||||||
u32 c_handler;
|
u32 c_handler;
|
||||||
u32 c_handler_arg;
|
|
||||||
u32 fxsave_area;
|
u32 fxsave_area;
|
||||||
u32 fxsave_area_size;
|
u32 fxsave_area_size;
|
||||||
struct smm_runtime runtime;
|
struct smm_runtime runtime;
|
||||||
|
@ -131,9 +129,6 @@ static inline bool smm_points_to_smram(const void *ptr, const size_t len)
|
||||||
* - num_concurrent_save_states - number of concurrent cpus needing save state
|
* - num_concurrent_save_states - number of concurrent cpus needing save state
|
||||||
* space
|
* space
|
||||||
* - handler - optional handler to call. Only used during SMM relocation setup.
|
* - handler - optional handler to call. Only used during SMM relocation setup.
|
||||||
* - handler_arg - optional argument to handler for SMM relocation setup. For
|
|
||||||
* loading the SMM module, the handler_arg is filled in with
|
|
||||||
* the address of the module's parameters (if present).
|
|
||||||
* - runtime - this field is a result only. The SMM runtime location is filled
|
* - runtime - this field is a result only. The SMM runtime location is filled
|
||||||
* into this field so the code doing the loading can manipulate the
|
* into this field so the code doing the loading can manipulate the
|
||||||
* runtime's assumptions. e.g. updating the APIC id to CPU map to
|
* runtime's assumptions. e.g. updating the APIC id to CPU map to
|
||||||
|
@ -154,7 +149,6 @@ struct smm_loader_params {
|
||||||
size_t num_concurrent_save_states;
|
size_t num_concurrent_save_states;
|
||||||
|
|
||||||
smm_handler_t handler;
|
smm_handler_t handler;
|
||||||
void *handler_arg;
|
|
||||||
|
|
||||||
struct smm_runtime *runtime;
|
struct smm_runtime *runtime;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue