[coreboot-gerrit] Patch set updated for coreboot: soc/apollolake: Add CPU driver skeleton

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Mon Jan 25 18:02:11 CET 2016


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13344

-gerrit

commit 27c50658681d4e26f2b67a17eea3720a6e5c87db
Author: Andrey Petrov <andrey.petrov at intel.com>
Date:   Wed Nov 4 18:06:04 2015 -0800

    soc/apollolake: Add CPU driver skeleton
    
    Change-Id: Ib0a4503f9b9d1ba3a4138e4cbd91e80a4de1e607
    Signed-off-by: Andrey Petrov <andrey.petrov at intel.com>
---
 src/soc/intel/apollolake/Makefile.inc      |  1 +
 src/soc/intel/apollolake/cpu.c             | 34 ++++++++++++++++++++++++++++++
 src/soc/intel/apollolake/include/soc/cpu.h |  2 ++
 3 files changed, 37 insertions(+)

diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index ca81304..59d13e3 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -24,6 +24,7 @@ romstage-y += tsc_freq.c
 romstage-y += uart_early.c
 
 ramstage-y += chip.c
+ramstage-y += cpu.c
 ramstage-y += gpio.c
 ramstage-y += memmap.c
 ramstage-y += mmap_boot.c
diff --git a/src/soc/intel/apollolake/cpu.c b/src/soc/intel/apollolake/cpu.c
new file mode 100644
index 0000000..8f3ccb3
--- /dev/null
+++ b/src/soc/intel/apollolake/cpu.c
@@ -0,0 +1,34 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Andrey Petrov <andrey.petrov at intel.com> for Intel Corp.)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <cpu/cpu.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <soc/cpu.h>
+
+static void cpu_core_init(device_t cpu)
+{
+}
+
+static struct device_operations cpu_dev_ops = {
+	.init = cpu_core_init,
+};
+
+static struct cpu_device_id cpu_table[] = {
+	{ X86_VENDOR_INTEL, CPUID_APOLLOLAKE_A0 },
+	{ 0, 0 },
+};
+
+static const struct cpu_driver driver __cpu_driver = {
+	.ops      = &cpu_dev_ops,
+	.id_table = cpu_table,
+};
diff --git a/src/soc/intel/apollolake/include/soc/cpu.h b/src/soc/intel/apollolake/include/soc/cpu.h
index 9c32e8e..1e827b7 100644
--- a/src/soc/intel/apollolake/include/soc/cpu.h
+++ b/src/soc/intel/apollolake/include/soc/cpu.h
@@ -15,6 +15,8 @@
 
 #include <cpu/x86/msr.h>
 
+#define CPUID_APOLLOLAKE_A0	0x506c8
+
 #define MSR_PLATFORM_INFO	0xce
 
 #define BASE_CLOCK_MHZ		100



More information about the coreboot-gerrit mailing list