diff options
author | Aaron Durbin <adurbin@chromium.org> | 2017-06-16 11:45:32 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-06-22 03:45:41 +0000 |
commit | 25a885b52dc4184b20c088683588d38bf68a6069 (patch) | |
tree | ca3c1ef40c02d8ee62a57a5a2aace21488533153 /src/include/cpu/x86 | |
parent | 08f93599a9728682783505fe7e6fa3e3b025a497 (diff) |
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>
Diffstat (limited to 'src/include/cpu/x86')
-rw-r--r-- | src/include/cpu/x86/smm.h | 10 |
1 files changed, 5 insertions, 5 deletions
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); |