blob: 9cf733806a5204cc42edf0edb8d5ab633e92e68e [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glassdc926ed2016-11-25 20:16:02 -07002/*
3 * Copyright (C) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
Simon Glassdc926ed2016-11-25 20:16:02 -07005 */
6
7#include <config.h>
8
9#ifdef CONFIG_ROM_SIZE
10/ {
11 binman {
12 filename = "u-boot.rom";
13 end-at-4gb;
Simon Glasse8561af2018-08-01 15:22:37 -060014 sort-by-offset;
Simon Glassdc926ed2016-11-25 20:16:02 -070015 pad-byte = <0xff>;
16 size = <CONFIG_ROM_SIZE>;
17#ifdef CONFIG_HAVE_INTEL_ME
18 intel-descriptor {
Stefan Roese3e0b4052017-03-30 12:58:11 +020019 filename = CONFIG_FLASH_DESCRIPTOR_FILE;
Simon Glassdc926ed2016-11-25 20:16:02 -070020 };
21 intel-me {
Stefan Roese3e0b4052017-03-30 12:58:11 +020022 filename = CONFIG_INTEL_ME_FILE;
Simon Glassdc926ed2016-11-25 20:16:02 -070023 };
24#endif
Simon Glassf03c70d2019-05-02 10:52:19 -060025#ifdef CONFIG_TPL
26 u-boot-tpl-with-ucode-ptr {
27 offset = <CONFIG_TPL_TEXT_BASE>;
28 };
29 u-boot-tpl-dtb {
30 };
31 u-boot-spl {
32 offset = <CONFIG_SPL_TEXT_BASE>;
33 };
34 u-boot-spl-dtb {
35 };
36 u-boot {
37 offset = <CONFIG_SYS_TEXT_BASE>;
38 };
39#elif defined(CONFIG_SPL)
Simon Glass46be3c62017-01-16 07:04:23 -070040 u-boot-spl-with-ucode-ptr {
Simon Glasse8561af2018-08-01 15:22:37 -060041 offset = <CONFIG_SPL_TEXT_BASE>;
Simon Glass46be3c62017-01-16 07:04:23 -070042 };
43
44 u-boot-dtb-with-ucode2 {
45 type = "u-boot-dtb-with-ucode";
46 };
47 u-boot {
Simon Glassf03c70d2019-05-02 10:52:19 -060048 /*
49 * TODO(sjg@chromium.org):
50 * Normally we use CONFIG_SYS_TEXT_BASE as the flash offset. But
51 * for boards with textbase in SDRAM we cannot do this. Just use
52 * an assumed-valid value (1MB before the end of flash) here so
53 * that we can actually build an image for coreboot, etc.
54 * We need a better solution, perhaps a separate Kconfig.
55 */
56#if CONFIG_SYS_TEXT_BASE == 0x1110000
Simon Glasse8561af2018-08-01 15:22:37 -060057 offset = <0xfff00000>;
Simon Glassf03c70d2019-05-02 10:52:19 -060058#else
59 offset = <CONFIG_SYS_TEXT_BASE>;
60#endif
Simon Glass46be3c62017-01-16 07:04:23 -070061 };
62#else
Simon Glassdc926ed2016-11-25 20:16:02 -070063 u-boot-with-ucode-ptr {
Simon Glasse8561af2018-08-01 15:22:37 -060064 offset = <CONFIG_SYS_TEXT_BASE>;
Simon Glassdc926ed2016-11-25 20:16:02 -070065 };
Simon Glass46be3c62017-01-16 07:04:23 -070066#endif
Simon Glassdc926ed2016-11-25 20:16:02 -070067 u-boot-dtb-with-ucode {
68 };
69 u-boot-ucode {
70 align = <16>;
71 };
72#ifdef CONFIG_HAVE_MRC
73 intel-mrc {
Simon Glasse8561af2018-08-01 15:22:37 -060074 offset = <CONFIG_X86_MRC_ADDR>;
Simon Glassdc926ed2016-11-25 20:16:02 -070075 };
76#endif
77#ifdef CONFIG_HAVE_FSP
78 intel-fsp {
Bin Meng27790c42016-12-25 20:52:46 -080079 filename = CONFIG_FSP_FILE;
Simon Glasse8561af2018-08-01 15:22:37 -060080 offset = <CONFIG_FSP_ADDR>;
Simon Glassdc926ed2016-11-25 20:16:02 -070081 };
82#endif
83#ifdef CONFIG_HAVE_CMC
84 intel-cmc {
Bin Meng27790c42016-12-25 20:52:46 -080085 filename = CONFIG_CMC_FILE;
Simon Glasse8561af2018-08-01 15:22:37 -060086 offset = <CONFIG_CMC_ADDR>;
Simon Glassdc926ed2016-11-25 20:16:02 -070087 };
88#endif
89#ifdef CONFIG_HAVE_VGA_BIOS
90 intel-vga {
Bin Meng27790c42016-12-25 20:52:46 -080091 filename = CONFIG_VGA_BIOS_FILE;
Simon Glasse8561af2018-08-01 15:22:37 -060092 offset = <CONFIG_VGA_BIOS_ADDR>;
Simon Glassdc926ed2016-11-25 20:16:02 -070093 };
94#endif
Bin Menga3dd11a2017-08-15 22:41:55 -070095#ifdef CONFIG_HAVE_VBT
96 intel-vbt {
97 filename = CONFIG_VBT_FILE;
Simon Glasse8561af2018-08-01 15:22:37 -060098 offset = <CONFIG_VBT_ADDR>;
Bin Menga3dd11a2017-08-15 22:41:55 -070099 };
100#endif
Simon Glassdc926ed2016-11-25 20:16:02 -0700101#ifdef CONFIG_HAVE_REFCODE
102 intel-refcode {
Simon Glasse8561af2018-08-01 15:22:37 -0600103 offset = <CONFIG_X86_REFCODE_ADDR>;
Simon Glassdc926ed2016-11-25 20:16:02 -0700104 };
105#endif
Simon Glassf03c70d2019-05-02 10:52:19 -0600106#ifdef CONFIG_TPL
107 x86-start16-tpl {
108 offset = <CONFIG_SYS_X86_START16>;
109 };
110#elif defined(CONFIG_SPL)
Simon Glass46be3c62017-01-16 07:04:23 -0700111 x86-start16-spl {
Simon Glasse8561af2018-08-01 15:22:37 -0600112 offset = <CONFIG_SYS_X86_START16>;
Simon Glass46be3c62017-01-16 07:04:23 -0700113 };
114#else
Simon Glassdc926ed2016-11-25 20:16:02 -0700115 x86-start16 {
Simon Glasse8561af2018-08-01 15:22:37 -0600116 offset = <CONFIG_SYS_X86_START16>;
Simon Glassdc926ed2016-11-25 20:16:02 -0700117 };
Simon Glass46be3c62017-01-16 07:04:23 -0700118#endif
Simon Glassdc926ed2016-11-25 20:16:02 -0700119 };
120};
121#endif