Johnny Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44502 )
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
xeon_sp/cpx: Fix get_system_memory_map to return the correct address
Similar to CB:43336, the HOB structure is actually a 8 byte address pointing to the HOB data.
Tested=Verified the values of the hob fields are the same printed by soc_display_memmap_hob().
Change-Id: I348d3cd80a56e86d22f20fcadf0316b462b86829 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/soc/intel/xeon_sp/cpx/soc_util.c 1 file changed, 7 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/44502/1
diff --git a/src/soc/intel/xeon_sp/cpx/soc_util.c b/src/soc/intel/xeon_sp/cpx/soc_util.c index fb78910a1..4153104 100644 --- a/src/soc/intel/xeon_sp/cpx/soc_util.c +++ b/src/soc/intel/xeon_sp/cpx/soc_util.c @@ -29,14 +29,17 @@ { size_t hob_size; const uint8_t mem_hob_guid[16] = FSP_SYSTEM_MEMORYMAP_HOB_GUID; + const struct SystemMemoryMapHob **memmap_addr;
- const void *memmap_addr = fsp_find_extension_hob_by_guid(mem_hob_guid, &hob_size); - assert(memmap_addr != NULL && hob_size != 0); - printk(BIOS_DEBUG, "FSP_SYSTEM_MEMORYMAP_HOB_GUID hob_size: %ld\n", hob_size); + memmap_addr = (const struct SystemMemoryMapHob **) + fsp_find_extension_hob_by_guid(mem_hob_guid, &hob_size); + /* hob_size is the size of the 8-byte address not the hob data */ + assert(memmap_addr != NULL && *memmap_addr != NULL && hob_size != 0);
- return (const struct SystemMemoryMapHob *) memmap_addr; + return (const struct SystemMemoryMapHob *)*memmap_addr; }
+ void get_cpu_info_from_apicid(uint32_t apicid, uint32_t core_bits, uint32_t thread_bits, uint8_t *package, uint8_t *core, uint8_t *thread) {
Hello build bot (Jenkins), Jonathan Zhang, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44502
to look at the new patch set (#2).
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
xeon_sp/cpx: Fix get_system_memory_map to return the correct address
Similar to CB:43336, the HOB structure is actually a 8 byte address pointing to the HOB data.
Tested=Verified the values of the hob fields are the same printed by soc_display_memmap_hob().
Change-Id: I348d3cd80a56e86d22f20fcadf0316b462b86829 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/soc/intel/xeon_sp/cpx/soc_util.c 1 file changed, 7 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/44502/2
Hello build bot (Jenkins), Jonathan Zhang, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44502
to look at the new patch set (#3).
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
xeon_sp/cpx: Fix get_system_memory_map to return the correct address
Similar to CB:43336, the HOB structure is actually a 8 byte address pointing to the HOB data.
Tested=Verified the values of the hob fields are the same printed by soc_display_memmap_hob().
Change-Id: I348d3cd80a56e86d22f20fcadf0316b462b86829 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/soc/intel/xeon_sp/cpx/soc_util.c 1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/44502/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44502 )
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
Patch Set 3: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/44502/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44502/3//COMMIT_MSG@9 PS3, Line 9: CB:43336 I would refer to the commit, not the gerrit CB id:
commit b45ed65
Hello build bot (Jenkins), Jonathan Zhang, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44502
to look at the new patch set (#4).
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
xeon_sp/cpx: Fix get_system_memory_map to return the correct address
Similar to commit b45ed65, the HOB structure is actually a 8 byte address pointing to the HOB data.
Tested=Verified the values of the hob fields are the same printed by soc_display_memmap_hob().
Change-Id: I348d3cd80a56e86d22f20fcadf0316b462b86829 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/soc/intel/xeon_sp/cpx/soc_util.c 1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/44502/4
Johnny Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44502 )
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44502/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44502/3//COMMIT_MSG@9 PS3, Line 9: CB:43336
I would refer to the commit, not the gerrit CB id: […]
Done
Hello build bot (Jenkins), Jonathan Zhang, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44502
to look at the new patch set (#5).
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
xeon_sp/cpx: Fix get_system_memory_map to return the correct address
Similar to commit b45ed65, the HOB structure is actually a 8 byte address pointing to the HOB data.
Tested=Verified the values of the hob fields are the same printed by soc_display_memmap_hob().
Change-Id: I348d3cd80a56e86d22f20fcadf0316b462b86829 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/soc/intel/xeon_sp/cpx/soc_util.c 1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/44502/5
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44502 )
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
Patch Set 5:
a
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44502 )
Change subject: xeon_sp/cpx: Fix get_system_memory_map to return the correct address ......................................................................
xeon_sp/cpx: Fix get_system_memory_map to return the correct address
Similar to commit b45ed65, the HOB structure is actually a 8 byte address pointing to the HOB data.
Tested=Verified the values of the hob fields are the same printed by soc_display_memmap_hob().
Change-Id: I348d3cd80a56e86d22f20fcadf0316b462b86829 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/44502 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/soc/intel/xeon_sp/cpx/soc_util.c 1 file changed, 8 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/soc/intel/xeon_sp/cpx/soc_util.c b/src/soc/intel/xeon_sp/cpx/soc_util.c index fb78910a1..15874c0 100644 --- a/src/soc/intel/xeon_sp/cpx/soc_util.c +++ b/src/soc/intel/xeon_sp/cpx/soc_util.c @@ -29,14 +29,19 @@ { size_t hob_size; const uint8_t mem_hob_guid[16] = FSP_SYSTEM_MEMORYMAP_HOB_GUID; + const struct SystemMemoryMapHob **memmap_addr;
- const void *memmap_addr = fsp_find_extension_hob_by_guid(mem_hob_guid, &hob_size); + memmap_addr = (const struct SystemMemoryMapHob **) + fsp_find_extension_hob_by_guid(mem_hob_guid, &hob_size); + /* hob_size is the size of the 8-byte address not the hob data */ assert(memmap_addr != NULL && hob_size != 0); - printk(BIOS_DEBUG, "FSP_SYSTEM_MEMORYMAP_HOB_GUID hob_size: %ld\n", hob_size); + /* assert the pointer to the hob is not NULL */ + assert(*memmap_addr != NULL);
- return (const struct SystemMemoryMapHob *) memmap_addr; + return *memmap_addr; }
+ void get_cpu_info_from_apicid(uint32_t apicid, uint32_t core_bits, uint32_t thread_bits, uint8_t *package, uint8_t *core, uint8_t *thread) {