Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48263 )
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
cpu/x86/smm_module_loaderv2: Fix compiling for x86_64
Change-Id: I9288ede88f822ff78dd9cb91020451dc935203a0 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/smm/smm_module_loaderv2.c M src/include/cpu/x86/smm.h 2 files changed, 11 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/48263/1
diff --git a/src/cpu/x86/smm/smm_module_loaderv2.c b/src/cpu/x86/smm/smm_module_loaderv2.c index 14ed9b8..873e800 100644 --- a/src/cpu/x86/smm/smm_module_loaderv2.c +++ b/src/cpu/x86/smm/smm_module_loaderv2.c @@ -221,7 +221,7 @@ */
static int smm_place_entry_code(uintptr_t smbase, unsigned int num_cpus, - unsigned int stack_top, const struct smm_loader_params *params) + uintptr_t stack_top, const struct smm_loader_params *params) { unsigned int i; unsigned int size; @@ -235,7 +235,7 @@ if (cpus[num_cpus - 1].smbase + params->smm_main_entry_offset < stack_top) { printk(BIOS_ERR, "%s: stack encroachment\n", __func__); - printk(BIOS_ERR, "%s: smbase %zx, stack_top %x\n", + printk(BIOS_ERR, "%s: smbase %zx, stack_top %lx\n", __func__, cpus[num_cpus].smbase, stack_top); return 0; } @@ -245,7 +245,7 @@ return 0; }
- printk(BIOS_INFO, "%s: smbase %zx, stack_top %x\n", + printk(BIOS_INFO, "%s: smbase %zx, stack_top %lx\n", __func__, cpus[num_cpus-1].smbase, stack_top);
/* start at 1, the first CPU stub code is already there */ @@ -311,9 +311,9 @@ * sets up the stack, and then jumps to common SMI handler */ if (params->num_concurrent_save_states > 1 || stub_entry_offset != 0) { - rc = smm_place_entry_code((unsigned int)base, - params->num_concurrent_save_states, - (unsigned int)params->stack_top, params); + rc = smm_place_entry_code((uintptr_t)base, + params->num_concurrent_save_states, + (uintptr_t)params->stack_top, params); } return rc; } @@ -384,7 +384,7 @@ /* The save state size encroached over the first SMM entry point. */ if (size <= params->smm_main_entry_offset) { printk(BIOS_ERR, "%s: encroachment over SMM entry point\n", __func__); - printk(BIOS_ERR, "%s: state save size: %zx : smm_entry_offset -> %x\n", + printk(BIOS_ERR, "%s: state save size: %zx : smm_entry_offset -> %lx\n", __func__, size, params->smm_main_entry_offset); return -1; } diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 6cf6f82..6dfe08d 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -150,10 +150,10 @@
/* The following are only used by X86_SMM_LOADER_VERSION2 */ #if CONFIG(X86_SMM_LOADER_VERSION2) - unsigned int smm_entry; - unsigned int smm_main_entry_offset; - unsigned int smram_start; - unsigned int smram_end; + uintptr_t smm_entry; + uintptr_t smm_main_entry_offset; + uintptr_t smram_start; + uintptr_t smram_end; #endif };
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48263 )
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48263/1/src/cpu/x86/smm/smm_module_... File src/cpu/x86/smm/smm_module_loaderv2.c:
https://review.coreboot.org/c/coreboot/+/48263/1/src/cpu/x86/smm/smm_module_... PS1, Line 224: uintptr_t stack_top, const struct smm_loader_params *params) code indent should use tabs where possible
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48263 )
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48263/2/src/cpu/x86/smm/smm_module_... File src/cpu/x86/smm/smm_module_loaderv2.c:
https://review.coreboot.org/c/coreboot/+/48263/2/src/cpu/x86/smm/smm_module_... PS2, Line 224: uintptr_t stack_top, const struct smm_loader_params *params) code indent should use tabs where possible
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48263 )
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
Patch Set 2: Code-Review+2
Hello build bot (Jenkins), Patrick Rudolph, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48263
to look at the new patch set (#3).
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
cpu/x86/smm_module_loaderv2: Fix compiling for x86_64
Change-Id: I9288ede88f822ff78dd9cb91020451dc935203a0 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/smm/smm_module_loaderv2.c M src/include/cpu/x86/smm.h 2 files changed, 11 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/48263/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48263 )
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
Patch Set 3: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/48263/3/src/cpu/x86/smm/smm_module_... File src/cpu/x86/smm/smm_module_loaderv2.c:
https://review.coreboot.org/c/coreboot/+/48263/3/src/cpu/x86/smm/smm_module_... PS3, Line 315: params->num_concurrent_save_states, I would have kept the alignment, or reflowed things to use the full 96-char limit.
Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48263 )
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
Patch Set 3: Code-Review+2
Arthur Heymans has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48263 )
Change subject: cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 ......................................................................
cpu/x86/smm_module_loaderv2: Fix compiling for x86_64
Change-Id: I9288ede88f822ff78dd9cb91020451dc935203a0 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/48263 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Christian Walter christian.walter@9elements.com --- M src/cpu/x86/smm/smm_module_loaderv2.c M src/include/cpu/x86/smm.h 2 files changed, 11 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Christian Walter: Looks good to me, approved
diff --git a/src/cpu/x86/smm/smm_module_loaderv2.c b/src/cpu/x86/smm/smm_module_loaderv2.c index 14ed9b8..e3e9c28 100644 --- a/src/cpu/x86/smm/smm_module_loaderv2.c +++ b/src/cpu/x86/smm/smm_module_loaderv2.c @@ -221,7 +221,7 @@ */
static int smm_place_entry_code(uintptr_t smbase, unsigned int num_cpus, - unsigned int stack_top, const struct smm_loader_params *params) + uintptr_t stack_top, const struct smm_loader_params *params) { unsigned int i; unsigned int size; @@ -235,7 +235,7 @@ if (cpus[num_cpus - 1].smbase + params->smm_main_entry_offset < stack_top) { printk(BIOS_ERR, "%s: stack encroachment\n", __func__); - printk(BIOS_ERR, "%s: smbase %zx, stack_top %x\n", + printk(BIOS_ERR, "%s: smbase %zx, stack_top %lx\n", __func__, cpus[num_cpus].smbase, stack_top); return 0; } @@ -245,7 +245,7 @@ return 0; }
- printk(BIOS_INFO, "%s: smbase %zx, stack_top %x\n", + printk(BIOS_INFO, "%s: smbase %zx, stack_top %lx\n", __func__, cpus[num_cpus-1].smbase, stack_top);
/* start at 1, the first CPU stub code is already there */ @@ -311,9 +311,9 @@ * sets up the stack, and then jumps to common SMI handler */ if (params->num_concurrent_save_states > 1 || stub_entry_offset != 0) { - rc = smm_place_entry_code((unsigned int)base, - params->num_concurrent_save_states, - (unsigned int)params->stack_top, params); + rc = smm_place_entry_code((uintptr_t)base, + params->num_concurrent_save_states, + (uintptr_t)params->stack_top, params); } return rc; } @@ -384,7 +384,7 @@ /* The save state size encroached over the first SMM entry point. */ if (size <= params->smm_main_entry_offset) { printk(BIOS_ERR, "%s: encroachment over SMM entry point\n", __func__); - printk(BIOS_ERR, "%s: state save size: %zx : smm_entry_offset -> %x\n", + printk(BIOS_ERR, "%s: state save size: %zx : smm_entry_offset -> %lx\n", __func__, size, params->smm_main_entry_offset); return -1; } diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 6cf6f82..6dfe08d 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -150,10 +150,10 @@
/* The following are only used by X86_SMM_LOADER_VERSION2 */ #if CONFIG(X86_SMM_LOADER_VERSION2) - unsigned int smm_entry; - unsigned int smm_main_entry_offset; - unsigned int smram_start; - unsigned int smram_end; + uintptr_t smm_entry; + uintptr_t smm_main_entry_offset; + uintptr_t smram_start; + uintptr_t smram_end; #endif };