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 | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 40 | u-boot-tpl-with-ucode-ptr { |
41 | offset = <CONFIG_TPL_TEXT_BASE>; | ||||
42 | }; | ||||
43 | u-boot-tpl-dtb { | ||||
44 | }; | ||||
45 | u-boot-spl { | ||||
46 | offset = <CONFIG_SPL_TEXT_BASE>; | ||||
47 | }; | ||||
48 | u-boot-spl-dtb { | ||||
49 | }; | ||||
50 | u-boot { | ||||
51 | offset = <CONFIG_SYS_TEXT_BASE>; | ||||
52 | }; | ||||
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 53 | #elif defined(CONFIG_SPL) |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 54 | u-boot-spl-with-ucode-ptr { |
55 | offset = <CONFIG_SPL_TEXT_BASE>; | ||||
56 | }; | ||||
57 | u-boot-dtb-with-ucode2 { | ||||
58 | type = "u-boot-dtb-with-ucode"; | ||||
59 | }; | ||||
60 | u-boot { | ||||
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 61 | /* |
62 | * TODO(sjg@chromium.org): | ||||
63 | * Normally we use CONFIG_SYS_TEXT_BASE as the flash offset. But | ||||
64 | * for boards with textbase in SDRAM we cannot do this. Just use | ||||
65 | * an assumed-valid value (1MB before the end of flash) here so | ||||
66 | * that we can actually build an image for coreboot, etc. | ||||
67 | * We need a better solution, perhaps a separate Kconfig. | ||||
68 | */ | ||||
69 | #if CONFIG_SYS_TEXT_BASE == 0x1110000 | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 70 | offset = <0xfff00000>; |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 71 | #else |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 72 | offset = <CONFIG_SYS_TEXT_BASE>; |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 73 | #endif |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 74 | }; |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 75 | #else |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 76 | u-boot-with-ucode-ptr { |
77 | offset = <CONFIG_SYS_TEXT_BASE>; | ||||
78 | }; | ||||
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 79 | #endif |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 80 | u-boot-dtb-with-ucode { |
81 | }; | ||||
82 | u-boot-ucode { | ||||
83 | align = <16>; | ||||
84 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 85 | #ifdef CONFIG_HAVE_MRC |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 86 | intel-mrc { |
87 | offset = <CONFIG_X86_MRC_ADDR>; | ||||
88 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 89 | #endif |
90 | #ifdef CONFIG_HAVE_FSP | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 91 | intel-fsp { |
92 | filename = CONFIG_FSP_FILE; | ||||
93 | offset = <CONFIG_FSP_ADDR>; | ||||
94 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 95 | #endif |
96 | #ifdef CONFIG_HAVE_CMC | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 97 | intel-cmc { |
98 | filename = CONFIG_CMC_FILE; | ||||
99 | offset = <CONFIG_CMC_ADDR>; | ||||
100 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 101 | #endif |
102 | #ifdef CONFIG_HAVE_VGA_BIOS | ||||
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 103 | intel-vga { |
104 | filename = CONFIG_VGA_BIOS_FILE; | ||||
105 | offset = <CONFIG_VGA_BIOS_ADDR>; | ||||
106 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 107 | #endif |
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 108 | #ifdef CONFIG_HAVE_VBT |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 109 | intel-vbt { |
110 | filename = CONFIG_VBT_FILE; | ||||
111 | offset = <CONFIG_VBT_ADDR>; | ||||
112 | }; | ||||
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 113 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 114 | #ifdef CONFIG_HAVE_REFCODE |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 115 | intel-refcode { |
116 | offset = <CONFIG_X86_REFCODE_ADDR>; | ||||
117 | }; | ||||
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 118 | #endif |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 119 | #ifdef CONFIG_TPL |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 120 | x86-start16-tpl { |
121 | offset = <CONFIG_SYS_X86_START16>; | ||||
122 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 123 | x86-reset16-tpl { |
124 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
125 | }; | ||||
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame] | 126 | #elif defined(CONFIG_SPL) |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 127 | x86-start16-spl { |
128 | offset = <CONFIG_SYS_X86_START16>; | ||||
129 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 130 | x86-reset16-spl { |
131 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
132 | }; | ||||
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 133 | #else |
Simon Glass | 771f02f | 2019-05-02 10:52:21 -0600 | [diff] [blame] | 134 | x86-start16 { |
135 | offset = <CONFIG_SYS_X86_START16>; | ||||
136 | }; | ||||
Simon Glass | abab18c | 2019-08-24 07:22:49 -0600 | [diff] [blame] | 137 | x86-reset16 { |
138 | offset = <CONFIG_RESET_VEC_LOC>; | ||||
139 | }; | ||||
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 140 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 141 | }; |
142 | #endif |