Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | b215fbd | 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 | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 5 | */ |
6 | |||||
7 | #include <config.h> | ||||
8 | |||||
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 9 | / { |
10 | binman { | ||||
Simon Glass | c5edefb | 2019-05-02 10:52:20 -0600 | [diff] [blame] | 11 | multiple-images; |
12 | rom: rom { | ||||
13 | }; | ||||
14 | }; | ||||
15 | }; | ||||
Simon Glass | c5edefb | 2019-05-02 10:52:20 -0600 | [diff] [blame] | 16 | |
17 | #ifdef CONFIG_ROM_SIZE | ||||
18 | &rom { | ||||
Simon Glass | e766d9f | 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 | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 24 | #ifdef CONFIG_HAVE_INTEL_ME |
Simon Glass | e766d9f | 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 | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 31 | #endif |
Simon Glass | 93c7607 | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 32 | #ifdef CONFIG_TPL |
Simon Glass | 86a8fb3 | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 33 | #ifdef CONFIG_HAVE_MICROCODE |
Simon Glass | e766d9f | 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 | 86a8fb3 | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 39 | #endif |
Simon Glass | 00959d8 | 2022-02-08 11:49:47 -0700 | [diff] [blame] | 40 | u-boot-spl { |
Simon Glass | cb88ec7 | 2021-03-18 20:25:09 +1300 | [diff] [blame] | 41 | type = "u-boot-spl"; |
Simon Glass | 28d7d76 | 2019-12-06 21:42:30 -0700 | [diff] [blame] | 42 | offset = <CONFIG_X86_OFFSET_SPL>; |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 43 | }; |
44 | u-boot { | ||||
Simon Glass | b311295 | 2019-12-06 21:42:29 -0700 | [diff] [blame] | 45 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 46 | }; |
Simon Glass | 93c7607 | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 47 | #elif defined(CONFIG_SPL) |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 48 | u-boot-spl-with-ucode-ptr { |
Simon Glass | 28d7d76 | 2019-12-06 21:42:30 -0700 | [diff] [blame] | 49 | offset = <CONFIG_X86_OFFSET_SPL>; |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 50 | }; |
51 | u-boot-dtb-with-ucode2 { | ||||
52 | type = "u-boot-dtb-with-ucode"; | ||||
53 | }; | ||||
54 | u-boot { | ||||
Simon Glass | b311295 | 2019-12-06 21:42:29 -0700 | [diff] [blame] | 55 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 56 | }; |
Simon Glass | 164f041 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 57 | #else |
Simon Glass | cad7b6b | 2021-03-18 20:25:10 +1300 | [diff] [blame] | 58 | # ifdef CONFIG_HAVE_MICROCODE |
Simon Glass | 4f1f507 | 2019-12-06 21:42:32 -0700 | [diff] [blame] | 59 | /* If there is no SPL then we need to put microcode in U-Boot */ |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 60 | u-boot-with-ucode-ptr { |
Simon Glass | b311295 | 2019-12-06 21:42:29 -0700 | [diff] [blame] | 61 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 62 | }; |
Simon Glass | 9589c44 | 2020-07-19 13:56:17 -0600 | [diff] [blame] | 63 | # else |
64 | u-boot-nodtb { | ||||
65 | offset = <CONFIG_X86_OFFSET_U_BOOT>; | ||||
66 | }; | ||||
Simon Glass | 4f1f507 | 2019-12-06 21:42:32 -0700 | [diff] [blame] | 67 | # endif |
Simon Glass | 164f041 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 68 | #endif |
Simon Glass | 86a8fb3 | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 69 | #ifdef CONFIG_HAVE_MICROCODE |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 70 | u-boot-dtb-with-ucode { |
71 | }; | ||||
72 | u-boot-ucode { | ||||
73 | align = <16>; | ||||
74 | }; | ||||
Simon Glass | 86a8fb3 | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 75 | #else |
76 | u-boot-dtb { | ||||
77 | }; | ||||
78 | #endif | ||||
Simon Glass | a78466a | 2020-07-19 13:56:15 -0600 | [diff] [blame] | 79 | fdtmap { |
80 | }; | ||||
Simon Glass | 2e2a003 | 2019-12-06 21:42:24 -0700 | [diff] [blame] | 81 | #ifdef CONFIG_HAVE_X86_FIT |
82 | intel-fit { | ||||
83 | }; | ||||
84 | intel-fit-ptr { | ||||
85 | }; | ||||
86 | #endif | ||||
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 87 | #ifdef CONFIG_HAVE_MRC |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 88 | intel-mrc { |
Tom Rini | fa2fd53 | 2022-12-04 10:14:07 -0500 | [diff] [blame] | 89 | offset = <CFG_X86_MRC_ADDR>; |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 90 | }; |
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 91 | #endif |
Simon Glass | dda8e3e | 2019-12-06 21:42:28 -0700 | [diff] [blame] | 92 | #ifdef CONFIG_FSP_VERSION1 |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 93 | intel-fsp { |
94 | filename = CONFIG_FSP_FILE; | ||||
95 | offset = <CONFIG_FSP_ADDR>; | ||||
96 | }; | ||||
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 97 | #endif |
Simon Glass | dda8e3e | 2019-12-06 21:42:28 -0700 | [diff] [blame] | 98 | #ifdef CONFIG_FSP_VERSION2 |
99 | intel-descriptor { | ||||
100 | filename = CONFIG_FLASH_DESCRIPTOR_FILE; | ||||
101 | }; | ||||
102 | intel-ifwi { | ||||
103 | filename = CONFIG_IFWI_INPUT_FILE; | ||||
104 | convert-fit; | ||||
105 | |||||
106 | section { | ||||
107 | size = <0x8000>; | ||||
108 | ifwi-replace; | ||||
109 | ifwi-subpart = "IBBP"; | ||||
110 | ifwi-entry = "IBBL"; | ||||
111 | u-boot-tpl { | ||||
112 | }; | ||||
113 | x86-start16-tpl { | ||||
114 | offset = <0x7800>; | ||||
115 | }; | ||||
116 | x86-reset16-tpl { | ||||
117 | offset = <0x7ff0>; | ||||
118 | }; | ||||
119 | }; | ||||
120 | }; | ||||
121 | intel-fsp-m { | ||||
122 | filename = CONFIG_FSP_FILE_M; | ||||
123 | }; | ||||
124 | intel-fsp-s { | ||||
125 | filename = CONFIG_FSP_FILE_S; | ||||
126 | }; | ||||
127 | #endif | ||||
Simon Glass | 653554b | 2020-11-04 09:57:17 -0700 | [diff] [blame] | 128 | private_files: private-files { |
129 | type = "files"; | ||||
130 | pattern = "*.dat"; | ||||
131 | }; | ||||
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 132 | #ifdef CONFIG_HAVE_CMC |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 133 | intel-cmc { |
134 | filename = CONFIG_CMC_FILE; | ||||
135 | offset = <CONFIG_CMC_ADDR>; | ||||
136 | }; | ||||
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 137 | #endif |
138 | #ifdef CONFIG_HAVE_VGA_BIOS | ||||
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 139 | intel-vga { |
140 | filename = CONFIG_VGA_BIOS_FILE; | ||||
141 | offset = <CONFIG_VGA_BIOS_ADDR>; | ||||
142 | }; | ||||
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 143 | #endif |
Bin Meng | 6c22379 | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 144 | #ifdef CONFIG_HAVE_VBT |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 145 | intel-vbt { |
146 | filename = CONFIG_VBT_FILE; | ||||
147 | offset = <CONFIG_VBT_ADDR>; | ||||
148 | }; | ||||
Bin Meng | 6c22379 | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 149 | #endif |
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 150 | #ifdef CONFIG_HAVE_REFCODE |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 151 | intel-refcode { |
Tom Rini | d414337 | 2022-12-04 10:14:08 -0500 | [diff] [blame] | 152 | offset = <CFG_X86_REFCODE_ADDR>; |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 153 | }; |
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 154 | #endif |
Simon Glass | 93c7607 | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 155 | #ifdef CONFIG_TPL |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 156 | x86-start16-tpl { |
157 | offset = <CONFIG_SYS_X86_START16>; | ||||
158 | }; | ||||
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 159 | x86-reset16-tpl { |
160 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
161 | }; | ||||
Simon Glass | 93c7607 | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 162 | #elif defined(CONFIG_SPL) |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 163 | x86-start16-spl { |
164 | offset = <CONFIG_SYS_X86_START16>; | ||||
165 | }; | ||||
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 166 | x86-reset16-spl { |
167 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
168 | }; | ||||
Simon Glass | 164f041 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 169 | #else |
Simon Glass | e766d9f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 170 | x86-start16 { |
171 | offset = <CONFIG_SYS_X86_START16>; | ||||
172 | }; | ||||
Simon Glass | 5e23918 | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 173 | x86-reset16 { |
174 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
175 | }; | ||||
Simon Glass | 164f041 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 176 | #endif |
Simon Glass | 624c70b | 2019-12-06 21:42:31 -0700 | [diff] [blame] | 177 | image-header { |
178 | location = "end"; | ||||
179 | }; | ||||
Simon Glass | b215fbd | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 180 | }; |
181 | #endif |