summaryrefslogtreecommitdiff
path: root/src/soc/ti/am335x/header.c
diff options
context:
space:
mode:
authorSam Lewis <sam.vr.lewis@gmail.com>2020-08-03 20:18:29 +1000
committerPatrick Georgi <pgeorgi@google.com>2020-08-19 07:17:37 +0000
commitad7b2e23ab5954f150a4b2f62378f1e7133e56c9 (patch)
tree545ce0a7cbf0eb2aa034a45d136ac0998339741f /src/soc/ti/am335x/header.c
parentcb287987a1750577e4471d3a474391a2c25321ab (diff)
downloadcoreboot-ad7b2e23ab5954f150a4b2f62378f1e7133e56c9.tar.xz
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree. This moves all the existing am335x code to soc/ and updates any references. It also adds a soc.c file as required for the ramstage. Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44378 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/soc/ti/am335x/header.c')
-rw-r--r--src/soc/ti/am335x/header.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/soc/ti/am335x/header.c b/src/soc/ti/am335x/header.c
new file mode 100644
index 0000000000..9edfdd062b
--- /dev/null
+++ b/src/soc/ti/am335x/header.c
@@ -0,0 +1,57 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <stdint.h>
+#include <symbols.h>
+
+#include "header.h"
+
+struct config_headers {
+ // The table of contents.
+ struct configuration_header_toc_item toc_chsettings;
+ struct configuration_header_toc_item toc_end;
+
+ // An inert instance of chsettings.
+ struct configuration_header_settings chsettings;
+} __packed;
+
+struct omap_image_headers {
+ union {
+ struct config_headers config_headers;
+ uint8_t bytes[512];
+ };
+ struct gp_device_header image_header;
+};
+
+// A symbol which defines how much of the image the iROM should load.
+extern char header_load_size;
+
+struct omap_image_headers headers __attribute__((section(".header"))) = {
+ .config_headers = {
+ .toc_chsettings = {
+ .start = offsetof(struct omap_image_headers,
+ config_headers.chsettings),
+ .size = sizeof(struct configuration_header_settings),
+ .reserved = { 0, 0, 0 },
+ .filename = "CHSETTINGS\0"
+ },
+ .toc_end = {
+ .start = 0xffffffff,
+ .size = 0xffffffff,
+ .reserved = { 0xffffffff, 0xffffffff, 0xffffffff },
+ .filename = { 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff }
+ },
+ .chsettings = {
+ .key = 0xc0c0c0c1,
+ .valid = 0,
+ .version = 1,
+ .reserved = 0,
+ .flags = 0
+ }
+ },
+ .image_header = {
+ .size = (uintptr_t)&header_load_size,
+ .destination = (uintptr_t)_dram
+ }
+};