blob: f0f8c71761a7ddc79cd6a92a348c618d3701f5dd [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glassdc926ed2016-11-25 20:16:02 -07002/*
3 * Copyright (C) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
Simon Glassdc926ed2016-11-25 20:16:02 -07005 */
6
7#include <config.h>
8
Simon Glassff23e682019-05-02 10:52:20 -06009#ifdef CONFIG_CHROMEOS
Simon Glassdc926ed2016-11-25 20:16:02 -070010/ {
11 binman {
Simon Glassff23e682019-05-02 10:52:20 -060012 multiple-images;
13 rom: rom {
14 };
15 };
16};
17#else
18/ {
19 rom: binman {
20 };
21};
22#endif
23
24#ifdef CONFIG_ROM_SIZE
25&rom {
Simon Glass771f02f2019-05-02 10:52:21 -060026 filename = "u-boot.rom";
27 end-at-4gb;
28 sort-by-offset;
29 pad-byte = <0xff>;
30 size = <CONFIG_ROM_SIZE>;
Simon Glassdc926ed2016-11-25 20:16:02 -070031#ifdef CONFIG_HAVE_INTEL_ME
Simon Glass771f02f2019-05-02 10:52:21 -060032 intel-descriptor {
33 filename = CONFIG_FLASH_DESCRIPTOR_FILE;
34 };
35 intel-me {
36 filename = CONFIG_INTEL_ME_FILE;
37 };
Simon Glassdc926ed2016-11-25 20:16:02 -070038#endif
Simon Glassf03c70d2019-05-02 10:52:19 -060039#ifdef CONFIG_TPL
Simon Glass3c4b98f2019-12-06 21:42:26 -070040#ifdef CONFIG_HAVE_MICROCODE
Simon Glass771f02f2019-05-02 10:52:21 -060041 u-boot-tpl-with-ucode-ptr {
42 offset = <CONFIG_TPL_TEXT_BASE>;
43 };
44 u-boot-tpl-dtb {
45 };
Simon Glass3c4b98f2019-12-06 21:42:26 -070046#endif
Simon Glass79c87322019-12-06 21:42:33 -070047 spl {
48 type = "section";
Simon Glass4d7a9232019-12-06 21:42:30 -070049 offset = <CONFIG_X86_OFFSET_SPL>;
Simon Glass79c87322019-12-06 21:42:33 -070050 u-boot-spl {
51 };
52 u-boot-spl-dtb {
53 };
Simon Glass771f02f2019-05-02 10:52:21 -060054 };
55 u-boot {
Simon Glass79c87322019-12-06 21:42:33 -070056 type = "section";
Simon Glass20af0ff2019-12-06 21:42:29 -070057 offset = <CONFIG_X86_OFFSET_U_BOOT>;
Simon Glass79c87322019-12-06 21:42:33 -070058 u-boot-nodtb {
59 };
60 u-boot-dtb {
61 };
Simon Glass771f02f2019-05-02 10:52:21 -060062 };
Simon Glassf03c70d2019-05-02 10:52:19 -060063#elif defined(CONFIG_SPL)
Simon Glass771f02f2019-05-02 10:52:21 -060064 u-boot-spl-with-ucode-ptr {
Simon Glass4d7a9232019-12-06 21:42:30 -070065 offset = <CONFIG_X86_OFFSET_SPL>;
Simon Glass771f02f2019-05-02 10:52:21 -060066 };
67 u-boot-dtb-with-ucode2 {
68 type = "u-boot-dtb-with-ucode";
69 };
70 u-boot {
Simon Glass20af0ff2019-12-06 21:42:29 -070071 offset = <CONFIG_X86_OFFSET_U_BOOT>;
Simon Glass771f02f2019-05-02 10:52:21 -060072 };
Simon Glass46be3c62017-01-16 07:04:23 -070073#else
Simon Glass014c66f2019-12-06 21:42:32 -070074# ifdef CONFIG_SPL
75 u-boot {
76 offset = <CONFIG_SYS_TEXT_BASE>;
77 };
78# else
79 /* If there is no SPL then we need to put microcode in U-Boot */
Simon Glass771f02f2019-05-02 10:52:21 -060080 u-boot-with-ucode-ptr {
Simon Glass20af0ff2019-12-06 21:42:29 -070081 offset = <CONFIG_X86_OFFSET_U_BOOT>;
Simon Glass771f02f2019-05-02 10:52:21 -060082 };
Simon Glass014c66f2019-12-06 21:42:32 -070083# endif
Simon Glass46be3c62017-01-16 07:04:23 -070084#endif
Simon Glass3c4b98f2019-12-06 21:42:26 -070085#ifdef CONFIG_HAVE_MICROCODE
Simon Glass771f02f2019-05-02 10:52:21 -060086 u-boot-dtb-with-ucode {
87 };
88 u-boot-ucode {
89 align = <16>;
90 };
Simon Glass3c4b98f2019-12-06 21:42:26 -070091#else
92 u-boot-dtb {
93 };
94#endif
Simon Glass7dbabbb2019-12-06 21:42:24 -070095#ifdef CONFIG_HAVE_X86_FIT
96 intel-fit {
97 };
98 intel-fit-ptr {
99 };
100#endif
Simon Glassdc926ed2016-11-25 20:16:02 -0700101#ifdef CONFIG_HAVE_MRC
Simon Glass771f02f2019-05-02 10:52:21 -0600102 intel-mrc {
103 offset = <CONFIG_X86_MRC_ADDR>;
104 };
Simon Glassdc926ed2016-11-25 20:16:02 -0700105#endif
Simon Glassf8dc7f42019-12-06 21:42:28 -0700106#ifdef CONFIG_FSP_VERSION1
Simon Glass771f02f2019-05-02 10:52:21 -0600107 intel-fsp {
108 filename = CONFIG_FSP_FILE;
109 offset = <CONFIG_FSP_ADDR>;
110 };
Simon Glassdc926ed2016-11-25 20:16:02 -0700111#endif
Simon Glassf8dc7f42019-12-06 21:42:28 -0700112#ifdef CONFIG_FSP_VERSION2
113 intel-descriptor {
114 filename = CONFIG_FLASH_DESCRIPTOR_FILE;
115 };
116 intel-ifwi {
117 filename = CONFIG_IFWI_INPUT_FILE;
118 convert-fit;
119
120 section {
121 size = <0x8000>;
122 ifwi-replace;
123 ifwi-subpart = "IBBP";
124 ifwi-entry = "IBBL";
125 u-boot-tpl {
126 };
127 x86-start16-tpl {
128 offset = <0x7800>;
129 };
130 x86-reset16-tpl {
131 offset = <0x7ff0>;
132 };
133 };
134 };
135 intel-fsp-m {
136 filename = CONFIG_FSP_FILE_M;
137 };
138 intel-fsp-s {
139 filename = CONFIG_FSP_FILE_S;
140 };
141#endif
Simon Glass8d543882019-12-06 21:42:31 -0700142 fdtmap {
143 };
Simon Glassdc926ed2016-11-25 20:16:02 -0700144#ifdef CONFIG_HAVE_CMC
Simon Glass771f02f2019-05-02 10:52:21 -0600145 intel-cmc {
146 filename = CONFIG_CMC_FILE;
147 offset = <CONFIG_CMC_ADDR>;
148 };
Simon Glassdc926ed2016-11-25 20:16:02 -0700149#endif
150#ifdef CONFIG_HAVE_VGA_BIOS
Simon Glass771f02f2019-05-02 10:52:21 -0600151 intel-vga {
152 filename = CONFIG_VGA_BIOS_FILE;
153 offset = <CONFIG_VGA_BIOS_ADDR>;
154 };
Simon Glassdc926ed2016-11-25 20:16:02 -0700155#endif
Bin Menga3dd11a2017-08-15 22:41:55 -0700156#ifdef CONFIG_HAVE_VBT
Simon Glass771f02f2019-05-02 10:52:21 -0600157 intel-vbt {
158 filename = CONFIG_VBT_FILE;
159 offset = <CONFIG_VBT_ADDR>;
160 };
Bin Menga3dd11a2017-08-15 22:41:55 -0700161#endif
Simon Glassdc926ed2016-11-25 20:16:02 -0700162#ifdef CONFIG_HAVE_REFCODE
Simon Glass771f02f2019-05-02 10:52:21 -0600163 intel-refcode {
164 offset = <CONFIG_X86_REFCODE_ADDR>;
165 };
Simon Glassdc926ed2016-11-25 20:16:02 -0700166#endif
Simon Glassf03c70d2019-05-02 10:52:19 -0600167#ifdef CONFIG_TPL
Simon Glass771f02f2019-05-02 10:52:21 -0600168 x86-start16-tpl {
169 offset = <CONFIG_SYS_X86_START16>;
170 };
Simon Glassabab18c2019-08-24 07:22:49 -0600171 x86-reset16-tpl {
172 offset = <CONFIG_RESET_VEC_LOC>;
173 };
Simon Glassf03c70d2019-05-02 10:52:19 -0600174#elif defined(CONFIG_SPL)
Simon Glass771f02f2019-05-02 10:52:21 -0600175 x86-start16-spl {
176 offset = <CONFIG_SYS_X86_START16>;
177 };
Simon Glassabab18c2019-08-24 07:22:49 -0600178 x86-reset16-spl {
179 offset = <CONFIG_RESET_VEC_LOC>;
180 };
Simon Glass46be3c62017-01-16 07:04:23 -0700181#else
Simon Glass771f02f2019-05-02 10:52:21 -0600182 x86-start16 {
183 offset = <CONFIG_SYS_X86_START16>;
184 };
Simon Glassabab18c2019-08-24 07:22:49 -0600185 x86-reset16 {
186 offset = <CONFIG_RESET_VEC_LOC>;
187 };
Simon Glass46be3c62017-01-16 07:04:23 -0700188#endif
Simon Glass8d543882019-12-06 21:42:31 -0700189 image-header {
190 location = "end";
191 };
Simon Glassdc926ed2016-11-25 20:16:02 -0700192};
193#endif