Morgan Jang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform
TEST=Exectue "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c 4 files changed, 131 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 3c5799b..4b2bb80 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -21,6 +21,7 @@ #endif #include <drivers/vpd/vpd.h> #include <stdlib.h> +#include <intelblocks/cpulib.h>
#define update_max(len, max_len, stmt) \ do { \ @@ -603,10 +604,47 @@ return 0x13; if (CONFIG(CPU_INTEL_SOCKET_LGA775)) return 0x15; + if (CONFIG(CPU_INTEL_SOCKET_LGA3647_1)) + return 0x36;
return 0x02; /* Unknown */ }
+unsigned int __weak smbios_processor_voltage(void) +{ + return 0; +} + +unsigned int __weak smbios_processor_external_clock(void) +{ + return 0; +} + +unsigned int __weak smbios_processor_status(void) +{ + return 0; +} + +unsigned int __weak smbios_processor_thread_count(void) +{ + return 0; +} + +unsigned int __weak smbios_processor_characteristics(void) +{ + return 0; +} + +unsigned int __weak smbios_processor_family(void) +{ + struct cpuid_result res; + + if (cpu_have_cpuid()) + res = cpuid(1); + + return (res.eax > 0) ? 0x0c : 0x6; +} + static int smbios_write_type1(unsigned long *current, int handle) { struct smbios_type1 *t = (struct smbios_type1 *)*current; @@ -706,7 +744,7 @@ t->processor_id[1] = res.edx; t->processor_manufacturer = smbios_cpu_vendor(t->eos); t->processor_version = smbios_processor_name(t->eos); - t->processor_family = (res.eax > 0) ? 0x0c : 0x6; + t->processor_family = smbios_processor_family(); t->processor_type = 3; /* System Processor */ /* * If CPUID leaf 11 is available, calculate "core count" by dividing @@ -743,6 +781,13 @@ t->max_speed = smbios_cpu_get_max_speed_mhz(); t->current_speed = smbios_cpu_get_current_speed_mhz(); } + + t->voltage = smbios_processor_voltage(); + t->external_clock = smbios_processor_external_clock(); + t->status = smbios_processor_status(); + t->thread_count = smbios_processor_thread_count(); + t->processor_characteristics = smbios_processor_characteristics(); + *current += len; return len; } diff --git a/src/include/smbios.h b/src/include/smbios.h index ed09d64..6223e07 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -54,6 +54,14 @@ const char *smbios_chassis_serial_number(void); const char *smbios_processor_serial_number(void);
+unsigned int smbios_processor_voltage(void); +unsigned int smbios_processor_external_clock(void); +unsigned int smbios_processor_status(void); +unsigned int smbios_processor_thread_count(void); +unsigned int smbios_processor_characteristics(void); +unsigned int smbios_processor_family(void); + + /* Used by mainboard to add port information of type 8 */ struct port_information; int smbios_write_type8(unsigned long *current, int *handle, diff --git a/src/mainboard/ocp/deltalake/Kconfig b/src/mainboard/ocp/deltalake/Kconfig index b4e88b5..c10e5a3 100644 --- a/src/mainboard/ocp/deltalake/Kconfig +++ b/src/mainboard/ocp/deltalake/Kconfig @@ -38,4 +38,8 @@ string default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/board.fmd"
+config CPU_INTEL_SOCKET_LGA3647_1 + bool + default y + endif # BOARD_OCP_DELTALAKE diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c index 88f89b5..31fb735 100644 --- a/src/mainboard/ocp/deltalake/ramstage.c +++ b/src/mainboard/ocp/deltalake/ramstage.c @@ -8,6 +8,7 @@ #include <soc/lewisburg_pch_gpio_defs.h> #include <soc/ramstage.h> #include <stdio.h> +#include <intelblocks/cpulib.h>
#include "ipmi.h"
@@ -70,6 +71,78 @@ } }
+unsigned int smbios_processor_voltage(void) +{ + struct cpuid_result res; + int voltage_in_mv; + + res.eax = 0; + + if (cpu_have_cpuid()) + res = cpuid(1); + + if ((res.eax >> 8 & 0x3F) == 0xF) + voltage_in_mv = 3000; + else + voltage_in_mv = 1600; + + return ((voltage_in_mv * 10) / 1000) | BIT7; +} + +unsigned int smbios_processor_external_clock(void) +{ + return 100; +} + +unsigned int smbios_processor_status(void) +{ + /* DeltaLake is one-socket platform, so hardcode it. */ + return 0x41; /* Populated and enabled */ +} + +unsigned int smbios_processor_thread_count(void) +{ + unsigned int core_count = 0, thread_count = 0; + + cpu_read_topology(&core_count, &thread_count); + + return thread_count * CONFIG_MAX_SOCKET; +} + +unsigned int smbios_processor_characteristics(void) +{ + struct cpuid_result res; + uint16_t characteristics; + + /* 64-bit Capable, Multi-Core, Power/Performance Control */ + characteristics = BIT2 + BIT3 + BIT7; + + if (cpu_have_cpuid()) { + res = cpuid(1); + + if ((res.ecx) & BIT5) + characteristics |= BIT6; /* Enhanced Virtualization */ + + if ((res.edx) & BIT28) + characteristics |= BIT4; /* Hardware Thread */ + + if (((cpuid_eax(0x80000000) - 0x80000000) + 1) > 2) { + res = cpuid(0x80000001); + + if ((res.edx) & BIT20) + characteristics |= BIT5; /* Execute Protection */ + } + + } + + return characteristics; +} + +unsigned int smbios_processor_family(void) +{ + return 0xb3; /* Xeon */ +} + static void mainboard_enable(struct device *dev) { dev->ops->get_smbios_strings = dl_oem_smbios_strings,
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#2).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform
TEST=Exectue "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c 4 files changed, 131 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#3).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform
TEST=Exectue "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c 4 files changed, 130 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/3
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#4).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform
TEST=Exectue "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c 4 files changed, 129 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/4
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
Patch Set 4: Code-Review+1
(6 comments)
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/Kconfig:
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 44: CPU_INTEL_SOCKET_LGA3647_1 Shouldn't this be selected from within the Xeon-SP code?
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 214: unsigned int smbios_processor_voltage(void) This isn't mainboard-specific, is it?
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 225: 3000 three volts?
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 232: unsigned int smbios_processor_external_clock(void) This isn't mainboard-specific, is it?
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 243: unsigned int smbios_processor_thread_count(void) This isn't mainboard-specific, is it?
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 253: { This isn't mainboard-specific, is it?
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#5).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform
TEST=Exectue "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 77 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/5
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43789/5/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/5/src/arch/x86/smbios.c@646 PS5, Line 646: trailing whitespace
Morgan Jang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
Patch Set 5:
(6 comments)
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/Kconfig:
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 44: CPU_INTEL_SOCKET_LGA3647_1
Shouldn't this be selected from within the Xeon-SP code?
I added CPU_INTEL_SOCKET_LGA3647_1 into Kconfig in Xeon-SP, and select it in mb/deltalake
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 214: unsigned int smbios_processor_voltage(void)
This isn't mainboard-specific, is it?
The commit https://review.coreboot.org/c/coreboot/+/43904 is implementing, so I remove this function.
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 225: 3000
three volts?
Same as above.
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 232: unsigned int smbios_processor_external_clock(void)
This isn't mainboard-specific, is it?
Move to smbios driver to implement it.
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 243: unsigned int smbios_processor_thread_count(void)
This isn't mainboard-specific, is it?
The commit https://review.coreboot.org/c/coreboot/+/32090 is implementing, so I remove this function.
https://review.coreboot.org/c/coreboot/+/43789/4/src/mainboard/ocp/deltalake... PS4, Line 253: {
This isn't mainboard-specific, is it?
Move to smbios driver to implement it.
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#6).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform
TEST=Exectue "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 77 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/6
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information for Deltalake platform ......................................................................
Patch Set 6: Code-Review+1
(2 comments)
https://review.coreboot.org/c/coreboot/+/43789/6//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43789/6//COMMIT_MSG@7 PS6, Line 7: for Deltalake platform This is already provided in the `mb/ocp/deltalake` prefix, so I'd drop it
https://review.coreboot.org/c/coreboot/+/43789/6//COMMIT_MSG@9 PS6, Line 9: Exectue Execute
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#7).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 77 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/7
Morgan Jang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43789/6//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43789/6//COMMIT_MSG@7 PS6, Line 7: for Deltalake platform
This is already provided in the `mb/ocp/deltalake` prefix, so I'd drop it
Done
https://review.coreboot.org/c/coreboot/+/43789/6//COMMIT_MSG@9 PS6, Line 9: Exectue
Execute
Done
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43789/7/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/7/src/arch/x86/smbios.c@627 PS7, Line 627: /* 64-bit Capable, Multi-Core, Power/Performance Control */ Not all supported x86 have those capabilities.
https://review.coreboot.org/c/coreboot/+/43789/7/src/arch/x86/smbios.c@799 PS7, Line 799: smbios_processor_status the default is now populated & enabled. See CB:43703
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#8).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 65 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/8
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 8:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43789/8/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/8/src/arch/x86/smbios.c@771 PS8, Line 771: trailing whitespace
https://review.coreboot.org/c/coreboot/+/43789/8/src/arch/x86/smbios.c@788 PS8, Line 788: trailing whitespace
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#9).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 77 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/9
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#10).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 78 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/10
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43789/10/src/mainboard/ocp/deltalak... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/43789/10/src/mainboard/ocp/deltalak... PS10, Line 20: spurious newline
Morgan Jang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 10:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43789/7/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/7/src/arch/x86/smbios.c@627 PS7, Line 627: /* 64-bit Capable, Multi-Core, Power/Performance Control */
Not all supported x86 have those capabilities.
Move to deltalake mainboard.
https://review.coreboot.org/c/coreboot/+/43789/7/src/arch/x86/smbios.c@799 PS7, Line 799: smbios_processor_status
the default is now populated & enabled. […]
Remove it.
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#11).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 76 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/11
Morgan Jang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43789/10/src/mainboard/ocp/deltalak... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/43789/10/src/mainboard/ocp/deltalak... PS10, Line 20:
spurious newline
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43789/11/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/11/src/arch/x86/smbios.c@652 PS11, Line 652: res this isn't initialized when !cpu_have_cpuid()
Maybe pass this as a parameter?
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#12).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 63 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/12
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#13).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 59 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/13
Morgan Jang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43789/11/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/11/src/arch/x86/smbios.c@652 PS11, Line 652: res
this isn't initialized when !cpu_have_cpuid() […]
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 13: Code-Review+1
(2 comments)
https://review.coreboot.org/c/coreboot/+/43789/13/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/13/src/arch/x86/smbios.c@606 PS13, Line 606: CPU_INTEL_SOCKET_LGA3647_1 I'd drop this symbol and use `XEON_SP_COMMON_BASE` or `SOC_INTEL_COOPERLAKE_SP` instead
https://review.coreboot.org/c/coreboot/+/43789/13/src/arch/x86/smbios.c@772 PS13, Line 772: 0x20 I'd use the BIT(x) macro from <types.h> instead of hex numbers
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#14).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c M src/soc/intel/xeon_sp/Kconfig 5 files changed, 59 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/14
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 14:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43789/14/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/14/src/arch/x86/smbios.c@785 PS14, Line 785: + smbios_processor_characteristics characteristics | smbios_processor_characteristics();
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#15).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h D src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c D src/soc/intel/xeon_sp/Kconfig 5 files changed, 55 insertions(+), 151 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/15
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#16).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h D src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/ramstage.c D src/soc/intel/xeon_sp/Kconfig 5 files changed, 55 insertions(+), 151 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/16
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#17).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/ramstage.c 3 files changed, 55 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/17
Morgan Jang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 17:
(3 comments)
https://review.coreboot.org/c/coreboot/+/43789/13/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/13/src/arch/x86/smbios.c@606 PS13, Line 606: CPU_INTEL_SOCKET_LGA3647_1
I'd drop this symbol and use `XEON_SP_COMMON_BASE` or `SOC_INTEL_COOPERLAKE_SP` instead
Done
https://review.coreboot.org/c/coreboot/+/43789/13/src/arch/x86/smbios.c@772 PS13, Line 772: 0x20
I'd use the BIT(x) macro from <types. […]
Done
https://review.coreboot.org/c/coreboot/+/43789/14/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/43789/14/src/arch/x86/smbios.c@785 PS14, Line 785: + smbios_processor_characteristics
characteristics | smbios_processor_characteristics();
Done
Hello Philipp Deppenwiese, build bot (Jenkins), Patrick Rudolph, Jonathan Zhang, Johnny Lin, Christian Walter, Jingle Hsu, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43789
to look at the new patch set (#18).
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/ramstage.c 3 files changed, 55 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/43789/18
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 18: Code-Review+1
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 18: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
Patch Set 18: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/43789 )
Change subject: mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information ......................................................................
mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information
TEST=Execute "dmidecode -t 4" to check if the processor information is correct for Deltalake platform
Change-Id: I5d075bb297f2e71a2545ab6ad82304a825ed7d19 Signed-off-by: Morgan Jang Morgan_Jang@wiwynn.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/43789 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: David Hendricks david.hendricks@gmail.com Reviewed-by: Patrick Rudolph siro@das-labor.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/ocp/deltalake/ramstage.c 3 files changed, 55 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified David Hendricks: Looks good to me, but someone else must approve Patrick Rudolph: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 8c7f92c..6c92d03 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -449,10 +449,27 @@ return 0x13; if (CONFIG(CPU_INTEL_SOCKET_LGA775)) return 0x15; + if (CONFIG(XEON_SP_COMMON_BASE)) + return 0x36;
return 0x02; /* Unknown */ }
+unsigned int __weak smbios_processor_external_clock(void) +{ + return 0; /* Unknown */ +} + +unsigned int __weak smbios_processor_characteristics(void) +{ + return 0; +} + +unsigned int __weak smbios_processor_family(struct cpuid_result res) +{ + return (res.eax > 0) ? 0x0c : 0x6; +} + static int smbios_write_type1(unsigned long *current, int handle) { struct smbios_type1 *t = (struct smbios_type1 *)*current; @@ -528,6 +545,7 @@ struct cpuid_result res; struct smbios_type4 *t = (struct smbios_type4 *)*current; int len = sizeof(struct smbios_type4); + uint16_t characteristics = 0;
/* Provide sane defaults even for CPU without CPUID */ res.eax = res.edx = 0; @@ -544,7 +562,7 @@ t->processor_id[1] = res.edx; t->processor_manufacturer = smbios_cpu_vendor(t->eos); t->processor_version = smbios_processor_name(t->eos); - t->processor_family = (res.eax > 0) ? 0x0c : 0x6; + t->processor_family = smbios_processor_family(res); t->processor_type = 3; /* System Processor */ /* * If CPUID leaf 11 is available, calculate "core count" by dividing @@ -583,10 +601,31 @@ if (cpu_have_cpuid() && cpuid_get_max_func() >= 0x16) { t->max_speed = cpuid_ebx(0x16); t->current_speed = cpuid_eax(0x16); /* base frequency */ + t->external_clock = cpuid_ecx(0x16); } else { t->max_speed = smbios_cpu_get_max_speed_mhz(); t->current_speed = smbios_cpu_get_current_speed_mhz(); + t->external_clock = smbios_processor_external_clock(); } + + if (cpu_have_cpuid()) { + res = cpuid(1); + + if ((res.ecx) & BIT(5)) + characteristics |= BIT(6); /* BIT6: Enhanced Virtualization */ + + if ((res.edx) & BIT(28)) + characteristics |= BIT(4); /* BIT4: Hardware Thread */ + + if (((cpuid_eax(0x80000000) - 0x80000000) + 1) > 2) { + res = cpuid(0x80000001); + + if ((res.edx) & BIT(20)) + characteristics |= BIT(5); /* BIT5: Execute Protection */ + } + } + t->processor_characteristics = characteristics | smbios_processor_characteristics(); + *current += len; return len; } diff --git a/src/include/smbios.h b/src/include/smbios.h index 0138161..521339e 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -54,6 +54,11 @@ const char *smbios_chassis_serial_number(void); const char *smbios_processor_serial_number(void);
+unsigned int smbios_processor_external_clock(void); +unsigned int smbios_processor_characteristics(void); +struct cpuid_result; +unsigned int smbios_processor_family(struct cpuid_result res); + /* Used by mainboard to add port information of type 8 */ struct port_information; int smbios_write_type8(unsigned long *current, int *handle, diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c index 17f33bd..69d739f 100644 --- a/src/mainboard/ocp/deltalake/ramstage.c +++ b/src/mainboard/ocp/deltalake/ramstage.c @@ -211,6 +211,16 @@ } #endif
+unsigned int smbios_processor_family(struct cpuid_result res) +{ + return 0xb3; /* Xeon */ +} + +unsigned int smbios_processor_characteristics(void) +{ + /* 64-bit Capable, Multi-Core, Power/Performance Control */ + return 0x8c; /* BIT2 + BIT3 + BIT7 */ +}
static void mainboard_enable(struct device *dev) {