From 25a885b52dc4184b20c088683588d38bf68a6069 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 16 Jun 2017 11:45:32 -0500 Subject: cpu/x86/smm: fix up types in module loader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/20241 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Reinauer --- src/include/cpu/x86/smm.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/include/cpu/x86') diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index a88537b44b..15e3ed30da 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -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); -- cgit v1.2.3