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