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