[coreboot-gerrit] New patch to review for coreboot: b225446 chromeos: Move memlayout.h/symbols.h into common directory

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Apr 16 14:23:13 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9748

-gerrit

commit b22544638b49d17c111e9422e1fb0c7f48da8ed9
Author: Julius Werner <jwerner at chromium.org>
Date:   Thu Jan 22 11:19:10 2015 -0800

    chromeos: Move memlayout.h/symbols.h into common directory
    
    Turns out there are uses for memlayout regions not specific to vboot2.
    Rather than add yet another set of headers for a single region, let's
    make the vboot2 one common for chromeos.
    
    BRANCH=veyron
    BUG=chrome-os-partner:35705
    TEST=Booted Jerry, compiled Blaze, Cosmos, Ryu and Storm.
    
    Change-Id: I228e0ffce1ccc792e7f5f5be6facaaca2650d818
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: c6d7aab9f4e6d0cfa12aa0478288e54ec3096d9b
    Original-Change-Id: I1dd7d9c4b6ab24de695d42a38913b6d9b952d49b
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/242630
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
 src/soc/marvell/bg4cd/include/soc/memlayout.ld     |  2 +-
 src/soc/nvidia/tegra124/include/soc/memlayout.ld   |  2 +-
 .../tegra132/include/soc/memlayout_vboot2.ld       |  2 +-
 src/soc/qualcomm/ipq806x/include/soc/memlayout.ld  |  2 +-
 src/soc/rockchip/rk3288/include/soc/memlayout.ld   |  2 +-
 src/vendorcode/google/chromeos/memlayout.h         | 50 ++++++++++++++++++++++
 src/vendorcode/google/chromeos/symbols.h           | 32 ++++++++++++++
 src/vendorcode/google/chromeos/vboot2/common.c     |  2 +-
 src/vendorcode/google/chromeos/vboot2/memlayout.h  | 50 ----------------------
 src/vendorcode/google/chromeos/vboot2/symbols.h    | 32 --------------
 src/vendorcode/google/chromeos/vboot2/verstub.c    |  2 +-
 11 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/src/soc/marvell/bg4cd/include/soc/memlayout.ld b/src/soc/marvell/bg4cd/include/soc/memlayout.ld
index 21c8f74..45cf395 100644
--- a/src/soc/marvell/bg4cd/include/soc/memlayout.ld
+++ b/src/soc/marvell/bg4cd/include/soc/memlayout.ld
@@ -18,7 +18,7 @@
  */
 
 #include <memlayout.h>
-#include <vendorcode/google/chromeos/vboot2/memlayout.h>
+#include <vendorcode/google/chromeos/memlayout.h>
 
 #include <arch/header.ld>
 
diff --git a/src/soc/nvidia/tegra124/include/soc/memlayout.ld b/src/soc/nvidia/tegra124/include/soc/memlayout.ld
index c8db5c5..0d9e772 100644
--- a/src/soc/nvidia/tegra124/include/soc/memlayout.ld
+++ b/src/soc/nvidia/tegra124/include/soc/memlayout.ld
@@ -18,7 +18,7 @@
  */
 
 #include <memlayout.h>
-#include <vendorcode/google/chromeos/vboot2/memlayout.h>
+#include <vendorcode/google/chromeos/memlayout.h>
 
 #include <arch/header.ld>
 
diff --git a/src/soc/nvidia/tegra132/include/soc/memlayout_vboot2.ld b/src/soc/nvidia/tegra132/include/soc/memlayout_vboot2.ld
index b990f54..2fdc38f 100644
--- a/src/soc/nvidia/tegra132/include/soc/memlayout_vboot2.ld
+++ b/src/soc/nvidia/tegra132/include/soc/memlayout_vboot2.ld
@@ -18,7 +18,7 @@
  */
 
 #include <memlayout.h>
-#include <vendorcode/google/chromeos/vboot2/memlayout.h>
+#include <vendorcode/google/chromeos/memlayout.h>
 
 #include <arch/header.ld>
 
diff --git a/src/soc/qualcomm/ipq806x/include/soc/memlayout.ld b/src/soc/qualcomm/ipq806x/include/soc/memlayout.ld
index 4c06020..7ac0662 100644
--- a/src/soc/qualcomm/ipq806x/include/soc/memlayout.ld
+++ b/src/soc/qualcomm/ipq806x/include/soc/memlayout.ld
@@ -18,7 +18,7 @@
  */
 
 #include <memlayout.h>
-#include <vendorcode/google/chromeos/vboot2/memlayout.h>
+#include <vendorcode/google/chromeos/memlayout.h>
 
 #include <arch/header.ld>
 
diff --git a/src/soc/rockchip/rk3288/include/soc/memlayout.ld b/src/soc/rockchip/rk3288/include/soc/memlayout.ld
index f5d3ca8..8a12aba 100644
--- a/src/soc/rockchip/rk3288/include/soc/memlayout.ld
+++ b/src/soc/rockchip/rk3288/include/soc/memlayout.ld
@@ -18,7 +18,7 @@
  */
 
 #include <memlayout.h>
-#include <vendorcode/google/chromeos/vboot2/memlayout.h>
+#include <vendorcode/google/chromeos/memlayout.h>
 
 #include <arch/header.ld>
 
diff --git a/src/vendorcode/google/chromeos/memlayout.h b/src/vendorcode/google/chromeos/memlayout.h
new file mode 100644
index 0000000..140da46
--- /dev/null
+++ b/src/vendorcode/google/chromeos/memlayout.h
@@ -0,0 +1,50 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* This file contains macro definitions for memlayout.ld linker scripts. */
+
+#ifndef __CHROMEOS_MEMLAYOUT_H
+#define __CHROMEOS_MEMLAYOUT_H
+
+/* Careful: required work buffer size depends on RW properties such as key size
+ * and algorithm -- what works for you might stop working after an update. Do
+ * NOT lower the asserted minimum without consulting vboot devs (rspangler)! */
+#define VBOOT2_WORK(addr, size) \
+	REGION(vboot2_work, addr, size, 8) \
+	_ = ASSERT(size >= 12K, "vboot2 work buffer must be at least 12K!");
+
+#ifdef __VERSTAGE__
+	#define VERSTAGE(addr, sz) \
+		SET_COUNTER(VERSTAGE, addr) \
+		_ = ASSERT(_everstage - _verstage <= sz, \
+			STR(Verstage exceeded its allotted size! (sz))); \
+		INCLUDE "vendorcode/google/chromeos/vboot2/verstage.verstage.ld"
+#else
+	#define VERSTAGE(addr, sz) \
+		SET_COUNTER(VERSTAGE, addr) \
+		. += sz;
+#endif
+
+#ifdef __VERSTAGE__
+	#define OVERLAP_VERSTAGE_ROMSTAGE(addr, size) VERSTAGE(addr, size)
+#else
+	#define OVERLAP_VERSTAGE_ROMSTAGE(addr, size) ROMSTAGE(addr, size)
+#endif
+
+#endif /* __CHROMEOS_MEMLAYOUT_H */
diff --git a/src/vendorcode/google/chromeos/symbols.h b/src/vendorcode/google/chromeos/symbols.h
new file mode 100644
index 0000000..21169f0
--- /dev/null
+++ b/src/vendorcode/google/chromeos/symbols.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * 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; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
+ */
+
+#ifndef __CHROMEOS_SYMBOLS_H
+#define __CHROMEOS_SYMBOLS_H
+
+extern u8 _vboot2_work[];
+extern u8 _evboot2_work[];
+#define _vboot2_work_size (_evboot2_work - _vboot2_work)
+
+/* Careful: _e<stage> and _<stage>_size only defined for the current stage! */
+extern u8 _verstage[];
+extern u8 _everstage[];
+#define _verstage_size (_everstage - _verstage)
+
+#endif /* __CHROMEOS_SYMBOLS_H */
diff --git a/src/vendorcode/google/chromeos/vboot2/common.c b/src/vendorcode/google/chromeos/vboot2/common.c
index caed89f..15b661a 100644
--- a/src/vendorcode/google/chromeos/vboot2/common.c
+++ b/src/vendorcode/google/chromeos/vboot2/common.c
@@ -21,9 +21,9 @@
 #include <console/console.h>
 #include <reset.h>
 #include "../chromeos.h"
+#include "../symbols.h"
 #include "../vboot_handoff.h"
 #include "misc.h"
-#include "symbols.h"
 
 void *vboot_load_stage(int stage_index,
 		       struct vboot_region *fw_main,
diff --git a/src/vendorcode/google/chromeos/vboot2/memlayout.h b/src/vendorcode/google/chromeos/vboot2/memlayout.h
deleted file mode 100644
index 7903dd2..0000000
--- a/src/vendorcode/google/chromeos/vboot2/memlayout.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * 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; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* This file contains macro definitions for memlayout.ld linker scripts. */
-
-#ifndef __CHROMEOS_VBOOT2_MEMLAYOUT_H
-#define __CHROMEOS_VBOOT2_MEMLAYOUT_H
-
-/* Careful: required work buffer size depends on RW properties such as key size
- * and algorithm -- what works for you might stop working after an update. Do
- * NOT lower the asserted minimum without consulting vboot devs (rspangler)! */
-#define VBOOT2_WORK(addr, size) \
-	REGION(vboot2_work, addr, size, 8) \
-	_ = ASSERT(size >= 12K, "vboot2 work buffer must be at least 12K!");
-
-#ifdef __VERSTAGE__
-	#define VERSTAGE(addr, sz) \
-		SET_COUNTER(VERSTAGE, addr) \
-		_ = ASSERT(_everstage - _verstage <= sz, \
-			STR(Verstage exceeded its allotted size! (sz))); \
-		INCLUDE "vendorcode/google/chromeos/vboot2/verstage.verstage.ld"
-#else
-	#define VERSTAGE(addr, sz) \
-		SET_COUNTER(VERSTAGE, addr) \
-		. += sz;
-#endif
-
-#ifdef __VERSTAGE__
-	#define OVERLAP_VERSTAGE_ROMSTAGE(addr, size) VERSTAGE(addr, size)
-#else
-	#define OVERLAP_VERSTAGE_ROMSTAGE(addr, size) ROMSTAGE(addr, size)
-#endif
-
-#endif /* __CHROMEOS_VBOOT2_MEMLAYOUT_H */
diff --git a/src/vendorcode/google/chromeos/vboot2/symbols.h b/src/vendorcode/google/chromeos/vboot2/symbols.h
deleted file mode 100644
index fda7114..0000000
--- a/src/vendorcode/google/chromeos/vboot2/symbols.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * 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; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
- */
-
-#ifndef __CHROMEOS_VBOOT2_SYMBOLS_H
-#define __CHROMEOS_VBOOT2_SYMBOLS_H
-
-extern u8 _vboot2_work[];
-extern u8 _evboot2_work[];
-#define _vboot2_work_size (_evboot2_work - _vboot2_work)
-
-/* Careful: _e<stage> and _<stage>_size only defined for the current stage! */
-extern u8 _verstage[];
-extern u8 _everstage[];
-#define _verstage_size (_everstage - _verstage)
-
-#endif /* __CHROMEOS_VBOOT2_SYMBOLS_H */
diff --git a/src/vendorcode/google/chromeos/vboot2/verstub.c b/src/vendorcode/google/chromeos/vboot2/verstub.c
index 3234683..46f57ab 100644
--- a/src/vendorcode/google/chromeos/vboot2/verstub.c
+++ b/src/vendorcode/google/chromeos/vboot2/verstub.c
@@ -23,8 +23,8 @@
 #include <string.h>
 #include <timestamp.h>
 #include "../chromeos.h"
+#include "../symbols.h"
 #include "misc.h"
-#include "symbols.h"
 
 static struct vb2_working_data *init_vb2_working_data(void)
 {



More information about the coreboot-gerrit mailing list