X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fx86%2Fcpu%2Fmp_init.c;h=cfd9bb447b8bcb7035fe2acc6f9efebe09d08242;hb=7e13f1d08fa85af97d11d9d13d506efdabd3db4d;hp=ca47e9e0b20e7f7eacc660cd7ccf525502183e39;hpb=2254e34c3fe5b2545dcad06774a426b2f881a090;p=u-boot diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index ca47e9e0b2..cfd9bb447b 100644 --- a/arch/x86/cpu/mp_init.c +++ b/arch/x86/cpu/mp_init.c @@ -11,16 +11,17 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -247,8 +248,11 @@ static int load_sipi_vector(atomic_t **ap_countp, int num_cpus) if (!stack) return -ENOMEM; params->stack_top = (u32)(stack + size); - - params->microcode_ptr = 0; +#if !defined(CONFIG_QEMU) && !defined(CONFIG_HAVE_FSP) && \ + !defined(CONFIG_INTEL_MID) + params->microcode_ptr = ucode_base; + debug("Microcode at %x\n", params->microcode_ptr); +#endif params->msr_table_ptr = (u32)msr_save; ret = save_bsp_msrs(msr_save, sizeof(msr_save)); if (ret < 0) @@ -405,8 +409,6 @@ static int init_bsp(struct udevice **devp) cpu_get_name(processor_name); debug("CPU: %s\n", processor_name); - lapic_setup(); - apic_id = lapicid(); ret = find_cpu_by_apic_id(apic_id, devp); if (ret) { @@ -417,7 +419,7 @@ static int init_bsp(struct udevice **devp) return 0; } -#ifdef CONFIG_QEMU +#ifdef CONFIG_QFW static int qemu_cpu_fixup(void) { int ret; @@ -493,7 +495,7 @@ int mp_init(struct mp_params *p) if (ret) return ret; -#ifdef CONFIG_QEMU +#ifdef CONFIG_QFW ret = qemu_cpu_fixup(); if (ret) return ret; @@ -560,12 +562,17 @@ int mp_init(struct mp_params *p) int mp_init_cpu(struct udevice *cpu, void *unused) { + struct cpu_platdata *plat = dev_get_parent_platdata(cpu); + /* * Multiple APs are brought up simultaneously and they may get the same * seq num in the uclass_resolve_seq() during device_probe(). To avoid * this, set req_seq to the reg number in the device tree in advance. */ - cpu->req_seq = fdtdec_get_int(gd->fdt_blob, cpu->of_offset, "reg", -1); + cpu->req_seq = fdtdec_get_int(gd->fdt_blob, dev_of_offset(cpu), "reg", + -1); + plat->ucode_version = microcode_read_rev(); + plat->device_id = gd->arch.x86_device; return device_probe(cpu); }