diff options
Diffstat (limited to 'src/soc/amd/common/block/cpu/noncar')
-rw-r--r-- | src/soc/amd/common/block/cpu/noncar/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/amd/common/block/cpu/noncar/cpu.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/cpu/noncar/Makefile.inc b/src/soc/amd/common/block/cpu/noncar/Makefile.inc index dd959417f1..808679dfea 100644 --- a/src/soc/amd/common/block/cpu/noncar/Makefile.inc +++ b/src/soc/amd/common/block/cpu/noncar/Makefile.inc @@ -3,6 +3,7 @@ ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_NONCAR),y) bootblock-y += pre_c.S bootblock-y += write_resume_eip.c romstage-y += memmap.c +ramstage-y += cpu.c ramstage-y += memmap.c endif # CONFIG_SOC_AMD_COMMON_BLOCK_NONCAR diff --git a/src/soc/amd/common/block/cpu/noncar/cpu.c b/src/soc/amd/common/block/cpu/noncar/cpu.c new file mode 100644 index 0000000000..7c1daf96f1 --- /dev/null +++ b/src/soc/amd/common/block/cpu/noncar/cpu.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <amdblocks/cpu.h> +#include <cpu/cpu.h> + +int get_cpu_count(void) +{ + return 1 + (cpuid_ecx(0x80000008) & 0xff); +} |