Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 2 | /* |
3 | * Copyright (C) 2016 Google, Inc | ||||
4 | * Written by Simon Glass <sjg@chromium.org> | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 5 | */ |
6 | |||||
7 | #include <config.h> | ||||
8 | |||||
Simon Glass | ff23e68 | 2019-05-02 10:52:20 -0600 | [diff] [blame] | 9 | #ifdef CONFIG_CHROMEOS |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 10 | / { |
11 | binman { | ||||
Simon Glass | ff23e68 | 2019-05-02 10:52:20 -0600 | [diff] [blame] | 12 | 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 Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 26 | filename = "u-boot.rom"; |
27 | end-at-4gb; | ||||
28 | sort-by-offset; | ||||
29 | pad-byte = <0xff>; | ||||
30 | size = <CONFIG_ROM_SIZE>; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 31 | #ifdef CONFIG_HAVE_INTEL_ME |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 32 | intel-descriptor { |
33 | filename = CONFIG_FLASH_DESCRIPTOR_FILE; | ||||
34 | }; | ||||
35 | intel-me { | ||||
36 | filename = CONFIG_INTEL_ME_FILE; | ||||
37 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 38 | #endif |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 39 | #ifdef CONFIG_TPL |
Simon Glass | 3c4b98f | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 40 | #ifdef CONFIG_HAVE_MICROCODE |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 41 | u-boot-tpl-with-ucode-ptr { |
42 | offset = <CONFIG_TPL_TEXT_BASE>; | ||||
43 | }; | ||||
44 | u-boot-tpl-dtb { | ||||
45 | }; | ||||
Simon Glass | 3c4b98f | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 46 | #endif |
Simon Glass | 79c8732 | 2019-12-06 21:42:33 -0700 | [diff] [blame] | 47 | spl { |
48 | type = "section"; | ||||
Simon Glass | 4d7a923 | 2019-12-06 21:42:30 -0700 | [diff] [blame] | 49 | offset = <CONFIG_X86_OFFSET_SPL>; |
Simon Glass | 79c8732 | 2019-12-06 21:42:33 -0700 | [diff] [blame] | 50 | u-boot-spl { |
51 | }; | ||||
52 | u-boot-spl-dtb { | ||||
53 | }; | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 54 | }; |
55 | u-boot { | ||||
Simon Glass | 79c8732 | 2019-12-06 21:42:33 -0700 | [diff] [blame] | 56 | type = "section"; |
Simon Glass | 20af0ff | 2019-12-06 21:42:29 -0700 | [diff] [blame] | 57 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | 79c8732 | 2019-12-06 21:42:33 -0700 | [diff] [blame] | 58 | u-boot-nodtb { |
59 | }; | ||||
60 | u-boot-dtb { | ||||
61 | }; | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 62 | }; |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 63 | #elif defined(CONFIG_SPL) |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 64 | u-boot-spl-with-ucode-ptr { |
Simon Glass | 4d7a923 | 2019-12-06 21:42:30 -0700 | [diff] [blame] | 65 | offset = <CONFIG_X86_OFFSET_SPL>; |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 66 | }; |
67 | u-boot-dtb-with-ucode2 { | ||||
68 | type = "u-boot-dtb-with-ucode"; | ||||
69 | }; | ||||
70 | u-boot { | ||||
Simon Glass | 20af0ff | 2019-12-06 21:42:29 -0700 | [diff] [blame] | 71 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 72 | }; |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 73 | #else |
Simon Glass | 014c66f | 2019-12-06 21:42:32 -0700 | [diff] [blame] | 74 | # ifdef CONFIG_SPL |
75 | u-boot { | ||||
76 | offset = <CONFIG_SYS_TEXT_BASE>; | ||||
77 | }; | ||||
Simon Glass | 0bd972a | 2020-07-19 13:56:17 -0600 | [diff] [blame^] | 78 | # elif defined(CONFIG_HAVE_MICROCODE) |
Simon Glass | 014c66f | 2019-12-06 21:42:32 -0700 | [diff] [blame] | 79 | /* If there is no SPL then we need to put microcode in U-Boot */ |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 80 | u-boot-with-ucode-ptr { |
Simon Glass | 20af0ff | 2019-12-06 21:42:29 -0700 | [diff] [blame] | 81 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 82 | }; |
Simon Glass | 0bd972a | 2020-07-19 13:56:17 -0600 | [diff] [blame^] | 83 | # else |
84 | u-boot-nodtb { | ||||
85 | offset = <CONFIG_X86_OFFSET_U_BOOT>; | ||||
86 | }; | ||||
Simon Glass | 014c66f | 2019-12-06 21:42:32 -0700 | [diff] [blame] | 87 | # endif |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 88 | #endif |
Simon Glass | 3c4b98f | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 89 | #ifdef CONFIG_HAVE_MICROCODE |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 90 | u-boot-dtb-with-ucode { |
91 | }; | ||||
92 | u-boot-ucode { | ||||
93 | align = <16>; | ||||
94 | }; | ||||
Simon Glass | 3c4b98f | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 95 | #else |
96 | u-boot-dtb { | ||||
97 | }; | ||||
98 | #endif | ||||
Simon Glass | 1542595 | 2020-07-19 13:56:15 -0600 | [diff] [blame] | 99 | fdtmap { |
100 | }; | ||||
Simon Glass | 7dbabbb | 2019-12-06 21:42:24 -0700 | [diff] [blame] | 101 | #ifdef CONFIG_HAVE_X86_FIT |
102 | intel-fit { | ||||
103 | }; | ||||
104 | intel-fit-ptr { | ||||
105 | }; | ||||
106 | #endif | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 107 | #ifdef CONFIG_HAVE_MRC |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 108 | intel-mrc { |
109 | offset = <CONFIG_X86_MRC_ADDR>; | ||||
110 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 111 | #endif |
Simon Glass | f8dc7f4 | 2019-12-06 21:42:28 -0700 | [diff] [blame] | 112 | #ifdef CONFIG_FSP_VERSION1 |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 113 | intel-fsp { |
114 | filename = CONFIG_FSP_FILE; | ||||
115 | offset = <CONFIG_FSP_ADDR>; | ||||
116 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 117 | #endif |
Simon Glass | f8dc7f4 | 2019-12-06 21:42:28 -0700 | [diff] [blame] | 118 | #ifdef CONFIG_FSP_VERSION2 |
119 | intel-descriptor { | ||||
120 | filename = CONFIG_FLASH_DESCRIPTOR_FILE; | ||||
121 | }; | ||||
122 | intel-ifwi { | ||||
123 | filename = CONFIG_IFWI_INPUT_FILE; | ||||
124 | convert-fit; | ||||
125 | |||||
126 | section { | ||||
127 | size = <0x8000>; | ||||
128 | ifwi-replace; | ||||
129 | ifwi-subpart = "IBBP"; | ||||
130 | ifwi-entry = "IBBL"; | ||||
131 | u-boot-tpl { | ||||
132 | }; | ||||
133 | x86-start16-tpl { | ||||
134 | offset = <0x7800>; | ||||
135 | }; | ||||
136 | x86-reset16-tpl { | ||||
137 | offset = <0x7ff0>; | ||||
138 | }; | ||||
139 | }; | ||||
140 | }; | ||||
141 | intel-fsp-m { | ||||
142 | filename = CONFIG_FSP_FILE_M; | ||||
143 | }; | ||||
144 | intel-fsp-s { | ||||
145 | filename = CONFIG_FSP_FILE_S; | ||||
146 | }; | ||||
147 | #endif | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 148 | #ifdef CONFIG_HAVE_CMC |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 149 | intel-cmc { |
150 | filename = CONFIG_CMC_FILE; | ||||
151 | offset = <CONFIG_CMC_ADDR>; | ||||
152 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 153 | #endif |
154 | #ifdef CONFIG_HAVE_VGA_BIOS | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 155 | intel-vga { |
156 | filename = CONFIG_VGA_BIOS_FILE; | ||||
157 | offset = <CONFIG_VGA_BIOS_ADDR>; | ||||
158 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 159 | #endif |
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 160 | #ifdef CONFIG_HAVE_VBT |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 161 | intel-vbt { |
162 | filename = CONFIG_VBT_FILE; | ||||
163 | offset = <CONFIG_VBT_ADDR>; | ||||
164 | }; | ||||
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 165 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 166 | #ifdef CONFIG_HAVE_REFCODE |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 167 | intel-refcode { |
168 | offset = <CONFIG_X86_REFCODE_ADDR>; | ||||
169 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 170 | #endif |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 171 | #ifdef CONFIG_TPL |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 172 | x86-start16-tpl { |
173 | offset = <CONFIG_SYS_X86_START16>; | ||||
174 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 175 | x86-reset16-tpl { |
176 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
177 | }; | ||||
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 178 | #elif defined(CONFIG_SPL) |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 179 | x86-start16-spl { |
180 | offset = <CONFIG_SYS_X86_START16>; | ||||
181 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 182 | x86-reset16-spl { |
183 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
184 | }; | ||||
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 185 | #else |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 186 | x86-start16 { |
187 | offset = <CONFIG_SYS_X86_START16>; | ||||
188 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 189 | x86-reset16 { |
190 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
191 | }; | ||||
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 192 | #endif |
Simon Glass | 8d54388 | 2019-12-06 21:42:31 -0700 | [diff] [blame] | 193 | image-header { |
194 | location = "end"; | ||||
195 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 196 | }; |
197 | #endif |