cpu/x86/smm: fix up types in module loader
For sizes and dimensions use size_t. For pointer casts use uintptr_t. Also, use the ALIGN_UP macro instead of open coding the operation. Change-Id: Id28968e60e51f46662c37249277454998afd5c0d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/20241 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
@@ -558,11 +558,11 @@ void *smm_get_save_state(int cpu);
|
||||
*/
|
||||
struct smm_loader_params {
|
||||
void *stack_top;
|
||||
int per_cpu_stack_size;
|
||||
int num_concurrent_stacks;
|
||||
size_t per_cpu_stack_size;
|
||||
size_t num_concurrent_stacks;
|
||||
|
||||
int per_cpu_save_state_size;
|
||||
int num_concurrent_save_states;
|
||||
size_t per_cpu_save_state_size;
|
||||
size_t num_concurrent_save_states;
|
||||
|
||||
smm_handler_t handler;
|
||||
void *handler_arg;
|
||||
@@ -572,7 +572,7 @@ struct smm_loader_params {
|
||||
|
||||
/* Both of these return 0 on success, < 0 on failure. */
|
||||
int smm_setup_relocation_handler(struct smm_loader_params *params);
|
||||
int smm_load_module(void *smram, int size, struct smm_loader_params *params);
|
||||
int smm_load_module(void *smram, size_t size, struct smm_loader_params *params);
|
||||
|
||||
/* Backup and restore default SMM region. */
|
||||
void *backup_default_smm_area(void);
|
||||
|
Reference in New Issue
Block a user