From 78c919bdc87bf4ad7fd39b90b9b0cd3ee33ec494 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 10 Dec 2018 14:19:35 +0530 Subject: mb/{intel,google}/{icelake_rvp,dragonegg}: make use of cpu_get_cpuid() helper function This patch replaces cpuid(1) references from icelake mainboard with x86 cpu common code library functions cpu_get_cpuid(). - cpu_get_cpuid() -> to get processor id (from cpuid.eax) Change-Id: Ia12d95d911dd6ee60a3a35937264fef668ad9e35 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/30124 Tested-by: build bot (Jenkins) Reviewed-by: Aamir Bohra Reviewed-by: HAOUAS Elyes --- .../google/dragonegg/variants/baseboard/memory.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/mainboard/google/dragonegg') diff --git a/src/mainboard/google/dragonegg/variants/baseboard/memory.c b/src/mainboard/google/dragonegg/variants/baseboard/memory.c index c7d579b1a9..3c458e800e 100644 --- a/src/mainboard/google/dragonegg/variants/baseboard/memory.c +++ b/src/mainboard/google/dragonegg/variants/baseboard/memory.c @@ -36,19 +36,6 @@ static const u8 dqs_map[][8] = { /* Rcomp resistor */ static const u16 rcomp_resistor[] = { 100, 100, 100 }; -/* - * get processor id using cpuid eax=1 - * return value will be in EAX register - */ -static uint32_t get_cpuid(void) -{ - struct cpuid_result cpuidr; - - cpuidr = cpuid(1); - - return cpuidr.eax; -} - void __weak variant_memory_params(struct lpddr4_config *mem_config) { /* Rcomp target */ @@ -61,7 +48,7 @@ void __weak variant_memory_params(struct lpddr4_config *mem_config) mem_config->dqs_map_size = sizeof(dqs_map); mem_config->rcomp_resistor = rcomp_resistor; mem_config->rcomp_resistor_size = sizeof(rcomp_resistor); - if (get_cpuid() == CPUID_ICELAKE_A0) { + if (cpu_get_cpuid() == CPUID_ICELAKE_A0) { mem_config->rcomp_target = rcomp_target_es0; mem_config->rcomp_target_size = sizeof(rcomp_target_es0); } else { -- cgit v1.2.3