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 | |
| 9 | #ifdef CONFIG_ROM_SIZE |
| 10 | / { |
| 11 | binman { |
| 12 | filename = "u-boot.rom"; |
| 13 | end-at-4gb; |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 14 | sort-by-offset; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 15 | pad-byte = <0xff>; |
| 16 | size = <CONFIG_ROM_SIZE>; |
| 17 | #ifdef CONFIG_HAVE_INTEL_ME |
| 18 | intel-descriptor { |
Stefan Roese | 3e0b405 | 2017-03-30 12:58:11 +0200 | [diff] [blame] | 19 | filename = CONFIG_FLASH_DESCRIPTOR_FILE; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 20 | }; |
| 21 | intel-me { |
Stefan Roese | 3e0b405 | 2017-03-30 12:58:11 +0200 | [diff] [blame] | 22 | filename = CONFIG_INTEL_ME_FILE; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 23 | }; |
| 24 | #endif |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame^] | 25 | #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 Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 40 | u-boot-spl-with-ucode-ptr { |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 41 | offset = <CONFIG_SPL_TEXT_BASE>; |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | u-boot-dtb-with-ucode2 { |
| 45 | type = "u-boot-dtb-with-ucode"; |
| 46 | }; |
| 47 | u-boot { |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame^] | 48 | /* |
| 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 Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 57 | offset = <0xfff00000>; |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame^] | 58 | #else |
| 59 | offset = <CONFIG_SYS_TEXT_BASE>; |
| 60 | #endif |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 61 | }; |
| 62 | #else |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 63 | u-boot-with-ucode-ptr { |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 64 | offset = <CONFIG_SYS_TEXT_BASE>; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 65 | }; |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 66 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 67 | u-boot-dtb-with-ucode { |
| 68 | }; |
| 69 | u-boot-ucode { |
| 70 | align = <16>; |
| 71 | }; |
| 72 | #ifdef CONFIG_HAVE_MRC |
| 73 | intel-mrc { |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 74 | offset = <CONFIG_X86_MRC_ADDR>; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 75 | }; |
| 76 | #endif |
| 77 | #ifdef CONFIG_HAVE_FSP |
| 78 | intel-fsp { |
Bin Meng | 27790c4 | 2016-12-25 20:52:46 -0800 | [diff] [blame] | 79 | filename = CONFIG_FSP_FILE; |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 80 | offset = <CONFIG_FSP_ADDR>; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 81 | }; |
| 82 | #endif |
| 83 | #ifdef CONFIG_HAVE_CMC |
| 84 | intel-cmc { |
Bin Meng | 27790c4 | 2016-12-25 20:52:46 -0800 | [diff] [blame] | 85 | filename = CONFIG_CMC_FILE; |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 86 | offset = <CONFIG_CMC_ADDR>; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 87 | }; |
| 88 | #endif |
| 89 | #ifdef CONFIG_HAVE_VGA_BIOS |
| 90 | intel-vga { |
Bin Meng | 27790c4 | 2016-12-25 20:52:46 -0800 | [diff] [blame] | 91 | filename = CONFIG_VGA_BIOS_FILE; |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 92 | offset = <CONFIG_VGA_BIOS_ADDR>; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 93 | }; |
| 94 | #endif |
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 95 | #ifdef CONFIG_HAVE_VBT |
| 96 | intel-vbt { |
| 97 | filename = CONFIG_VBT_FILE; |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 98 | offset = <CONFIG_VBT_ADDR>; |
Bin Meng | a3dd11a | 2017-08-15 22:41:55 -0700 | [diff] [blame] | 99 | }; |
| 100 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 101 | #ifdef CONFIG_HAVE_REFCODE |
| 102 | intel-refcode { |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 103 | offset = <CONFIG_X86_REFCODE_ADDR>; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 104 | }; |
| 105 | #endif |
Simon Glass | f03c70d | 2019-05-02 10:52:19 -0600 | [diff] [blame^] | 106 | #ifdef CONFIG_TPL |
| 107 | x86-start16-tpl { |
| 108 | offset = <CONFIG_SYS_X86_START16>; |
| 109 | }; |
| 110 | #elif defined(CONFIG_SPL) |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 111 | x86-start16-spl { |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 112 | offset = <CONFIG_SYS_X86_START16>; |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 113 | }; |
| 114 | #else |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 115 | x86-start16 { |
Simon Glass | e8561af | 2018-08-01 15:22:37 -0600 | [diff] [blame] | 116 | offset = <CONFIG_SYS_X86_START16>; |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 117 | }; |
Simon Glass | 46be3c6 | 2017-01-16 07:04:23 -0700 | [diff] [blame] | 118 | #endif |
Simon Glass | dc926ed | 2016-11-25 20:16:02 -0700 | [diff] [blame] | 119 | }; |
| 120 | }; |
| 121 | #endif |