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 | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 47 | u-boot-spl { |
48 | offset = <CONFIG_SPL_TEXT_BASE>; | ||||
49 | }; | ||||
50 | u-boot-spl-dtb { | ||||
51 | }; | ||||
52 | u-boot { | ||||
Simon Glass | 20af0ff | 2019-12-06 21:42:29 -0700 | [diff] [blame^] | 53 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 54 | }; |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 55 | #elif defined(CONFIG_SPL) |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 56 | u-boot-spl-with-ucode-ptr { |
57 | offset = <CONFIG_SPL_TEXT_BASE>; | ||||
58 | }; | ||||
59 | u-boot-dtb-with-ucode2 { | ||||
60 | type = "u-boot-dtb-with-ucode"; | ||||
61 | }; | ||||
62 | u-boot { | ||||
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 | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 65 | #else |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 66 | u-boot-with-ucode-ptr { |
Simon Glass | 20af0ff | 2019-12-06 21:42:29 -0700 | [diff] [blame^] | 67 | offset = <CONFIG_X86_OFFSET_U_BOOT>; |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 68 | }; |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 69 | #endif |
Simon Glass | 3c4b98f | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 70 | #ifdef CONFIG_HAVE_MICROCODE |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 71 | u-boot-dtb-with-ucode { |
72 | }; | ||||
73 | u-boot-ucode { | ||||
74 | align = <16>; | ||||
75 | }; | ||||
Simon Glass | 3c4b98f | 2019-12-06 21:42:26 -0700 | [diff] [blame] | 76 | #else |
77 | u-boot-dtb { | ||||
78 | }; | ||||
79 | #endif | ||||
Simon Glass | 7dbabbb | 2019-12-06 21:42:24 -0700 | [diff] [blame] | 80 | #ifdef CONFIG_HAVE_X86_FIT |
81 | intel-fit { | ||||
82 | }; | ||||
83 | intel-fit-ptr { | ||||
84 | }; | ||||
85 | #endif | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 86 | #ifdef CONFIG_HAVE_MRC |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 87 | intel-mrc { |
88 | offset = <CONFIG_X86_MRC_ADDR>; | ||||
89 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 90 | #endif |
Simon Glass | f8dc7f4 | 2019-12-06 21:42:28 -0700 | [diff] [blame] | 91 | #ifdef CONFIG_FSP_VERSION1 |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 92 | intel-fsp { |
93 | filename = CONFIG_FSP_FILE; | ||||
94 | offset = <CONFIG_FSP_ADDR>; | ||||
95 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 96 | #endif |
Simon Glass | f8dc7f4 | 2019-12-06 21:42:28 -0700 | [diff] [blame] | 97 | #ifdef CONFIG_FSP_VERSION2 |
98 | intel-descriptor { | ||||
99 | filename = CONFIG_FLASH_DESCRIPTOR_FILE; | ||||
100 | }; | ||||
101 | intel-ifwi { | ||||
102 | filename = CONFIG_IFWI_INPUT_FILE; | ||||
103 | convert-fit; | ||||
104 | |||||
105 | section { | ||||
106 | size = <0x8000>; | ||||
107 | ifwi-replace; | ||||
108 | ifwi-subpart = "IBBP"; | ||||
109 | ifwi-entry = "IBBL"; | ||||
110 | u-boot-tpl { | ||||
111 | }; | ||||
112 | x86-start16-tpl { | ||||
113 | offset = <0x7800>; | ||||
114 | }; | ||||
115 | x86-reset16-tpl { | ||||
116 | offset = <0x7ff0>; | ||||
117 | }; | ||||
118 | }; | ||||
119 | }; | ||||
120 | intel-fsp-m { | ||||
121 | filename = CONFIG_FSP_FILE_M; | ||||
122 | }; | ||||
123 | intel-fsp-s { | ||||
124 | filename = CONFIG_FSP_FILE_S; | ||||
125 | }; | ||||
126 | #endif | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 127 | #ifdef CONFIG_HAVE_CMC |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 128 | intel-cmc { |
129 | filename = CONFIG_CMC_FILE; | ||||
130 | offset = <CONFIG_CMC_ADDR>; | ||||
131 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 132 | #endif |
133 | #ifdef CONFIG_HAVE_VGA_BIOS | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 134 | intel-vga { |
135 | filename = CONFIG_VGA_BIOS_FILE; | ||||
136 | offset = <CONFIG_VGA_BIOS_ADDR>; | ||||
137 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 138 | #endif |
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 139 | #ifdef CONFIG_HAVE_VBT |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 140 | intel-vbt { |
141 | filename = CONFIG_VBT_FILE; | ||||
142 | offset = <CONFIG_VBT_ADDR>; | ||||
143 | }; | ||||
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 144 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 145 | #ifdef CONFIG_HAVE_REFCODE |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 146 | intel-refcode { |
147 | offset = <CONFIG_X86_REFCODE_ADDR>; | ||||
148 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 149 | #endif |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 150 | #ifdef CONFIG_TPL |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 151 | x86-start16-tpl { |
152 | offset = <CONFIG_SYS_X86_START16>; | ||||
153 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 154 | x86-reset16-tpl { |
155 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
156 | }; | ||||
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 157 | #elif defined(CONFIG_SPL) |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 158 | x86-start16-spl { |
159 | offset = <CONFIG_SYS_X86_START16>; | ||||
160 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 161 | x86-reset16-spl { |
162 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
163 | }; | ||||
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 164 | #else |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 165 | x86-start16 { |
166 | offset = <CONFIG_SYS_X86_START16>; | ||||
167 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 168 | x86-reset16 { |
169 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
170 | }; | ||||
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 171 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 172 | }; |
173 | #endif |