blob: 1005058b482e4179407d07c1d2c41217c8360744 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Kyösti Mälkkief844012013-06-25 23:17:43 +03002
Kyösti Mälkkie8792be2014-02-26 15:19:04 +02003#ifndef _RULES_H
4#define _RULES_H
5
Jakub Czapiga084ad932021-03-25 13:10:31 +01006#if defined(__TEST__)
7#define ENV_TEST 1
8#else
9#define ENV_TEST 0
10#endif
11
Angel Pons46451972020-06-08 15:52:03 +020012#if defined(__TIMELESS__)
13#define ENV_TIMELESS 1
14#else
15#define ENV_TIMELESS 0
16#endif
17
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020018/* Useful helpers to tell whether the code is executing in bootblock,
19 * romstage, ramstage or SMM.
20 */
21
Julius Werner99f46832018-05-16 14:14:04 -070022#if defined(__DECOMPRESSOR__)
23#define ENV_DECOMPRESSOR 1
24#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +020025#define ENV_SEPARATE_ROMSTAGE 0
Julius Werner99f46832018-05-16 14:14:04 -070026#define ENV_RAMSTAGE 0
27#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -070028#define ENV_SEPARATE_VERSTAGE 0
Julius Werner99f46832018-05-16 14:14:04 -070029#define ENV_RMODULE 0
30#define ENV_POSTCAR 0
31#define ENV_LIBAGESA 0
32#define ENV_STRING "decompressor"
33
34#elif defined(__BOOTBLOCK__)
35#define ENV_DECOMPRESSOR 0
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020036#define ENV_BOOTBLOCK 1
Arthur Heymansa2bc2542021-05-29 08:10:49 +020037#define ENV_SEPARATE_ROMSTAGE 0
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020038#define ENV_RAMSTAGE 0
39#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -070040#define ENV_SEPARATE_VERSTAGE 0
Aaron Durbindde76292015-09-05 12:59:26 -050041#define ENV_RMODULE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -050042#define ENV_POSTCAR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +020043#define ENV_LIBAGESA 0
Ben Gardneraa5f5b12015-11-19 10:48:47 -060044#define ENV_STRING "bootblock"
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020045
Patrick Georgi815f4bf2015-04-28 22:43:31 +020046#elif defined(__ROMSTAGE__)
Julius Werner99f46832018-05-16 14:14:04 -070047#define ENV_DECOMPRESSOR 0
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020048#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +020049#define ENV_SEPARATE_ROMSTAGE 1
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020050#define ENV_RAMSTAGE 0
51#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -070052#define ENV_SEPARATE_VERSTAGE 0
Aaron Durbindde76292015-09-05 12:59:26 -050053#define ENV_RMODULE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -050054#define ENV_POSTCAR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +020055#define ENV_LIBAGESA 0
Ben Gardneraa5f5b12015-11-19 10:48:47 -060056#define ENV_STRING "romstage"
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020057
58#elif defined(__SMM__)
Julius Werner99f46832018-05-16 14:14:04 -070059#define ENV_DECOMPRESSOR 0
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020060#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +020061#define ENV_SEPARATE_ROMSTAGE 0
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020062#define ENV_RAMSTAGE 0
63#define ENV_SMM 1
Julius Werner21a40532020-04-21 16:03:53 -070064#define ENV_SEPARATE_VERSTAGE 0
Aaron Durbindde76292015-09-05 12:59:26 -050065#define ENV_RMODULE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -050066#define ENV_POSTCAR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +020067#define ENV_LIBAGESA 0
Ben Gardneraa5f5b12015-11-19 10:48:47 -060068#define ENV_STRING "smm"
Patrick Georgicc8171f2015-04-28 22:26:23 +020069
Julius Werner21a40532020-04-21 16:03:53 -070070/*
71 * NOTE: "verstage" code may either run as a separate stage or linked into the
Martin Roth0639bff2020-11-09 13:13:27 -070072 * bootblock/romstage, depending on the setting of the VBOOT_SEPARATE_VERSTAGE
73 * kconfig option. The ENV_SEPARATE_VERSTAGE macro will only return true for
74 * "verstage" code when CONFIG(VBOOT_SEPARATE_VERSTAGE) is true, otherwise that
Arthur Heymansa2bc2542021-05-29 08:10:49 +020075 * code will have ENV_BOOTBLOCK or ENV_SEPARATE_ROMSTAGE set (depending on the
Martin Roth0639bff2020-11-09 13:13:27 -070076 * "VBOOT_STARTS_IN_"... kconfig options).
Julius Werner21a40532020-04-21 16:03:53 -070077 */
Patrick Georgicc8171f2015-04-28 22:26:23 +020078#elif defined(__VERSTAGE__)
Julius Werner99f46832018-05-16 14:14:04 -070079#define ENV_DECOMPRESSOR 0
Patrick Georgicc8171f2015-04-28 22:26:23 +020080#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +020081#define ENV_SEPARATE_ROMSTAGE 0
Patrick Georgicc8171f2015-04-28 22:26:23 +020082#define ENV_RAMSTAGE 0
83#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -070084#define ENV_SEPARATE_VERSTAGE 1
Aaron Durbindde76292015-09-05 12:59:26 -050085#define ENV_RMODULE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -050086#define ENV_POSTCAR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +020087#define ENV_LIBAGESA 0
Kangheui Won4b5c8b52020-10-07 14:29:38 +110088#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
89#define ENV_STRING "verstage-before-bootblock"
90#else
Ben Gardneraa5f5b12015-11-19 10:48:47 -060091#define ENV_STRING "verstage"
Kangheui Won4b5c8b52020-10-07 14:29:38 +110092#endif
Furquan Shaikhabde3b52014-08-26 15:39:51 -070093
Aaron Durbincd96c5c2015-09-04 16:28:15 -050094#elif defined(__RAMSTAGE__)
Julius Werner99f46832018-05-16 14:14:04 -070095#define ENV_DECOMPRESSOR 0
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020096#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +020097#define ENV_SEPARATE_ROMSTAGE 0
Kyösti Mälkkie8792be2014-02-26 15:19:04 +020098#define ENV_RAMSTAGE 1
99#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -0700100#define ENV_SEPARATE_VERSTAGE 0
Aaron Durbindde76292015-09-05 12:59:26 -0500101#define ENV_RMODULE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500102#define ENV_POSTCAR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200103#define ENV_LIBAGESA 0
Ben Gardneraa5f5b12015-11-19 10:48:47 -0600104#define ENV_STRING "ramstage"
Aaron Durbindde76292015-09-05 12:59:26 -0500105
106#elif defined(__RMODULE__)
Julius Werner99f46832018-05-16 14:14:04 -0700107#define ENV_DECOMPRESSOR 0
Aaron Durbindde76292015-09-05 12:59:26 -0500108#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +0200109#define ENV_SEPARATE_ROMSTAGE 0
Aaron Durbindde76292015-09-05 12:59:26 -0500110#define ENV_RAMSTAGE 0
111#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -0700112#define ENV_SEPARATE_VERSTAGE 0
Aaron Durbindde76292015-09-05 12:59:26 -0500113#define ENV_RMODULE 1
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500114#define ENV_POSTCAR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200115#define ENV_LIBAGESA 0
Ben Gardneraa5f5b12015-11-19 10:48:47 -0600116#define ENV_STRING "rmodule"
Aaron Durbincd96c5c2015-09-04 16:28:15 -0500117
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500118#elif defined(__POSTCAR__)
Julius Werner99f46832018-05-16 14:14:04 -0700119#define ENV_DECOMPRESSOR 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500120#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +0200121#define ENV_SEPARATE_ROMSTAGE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500122#define ENV_RAMSTAGE 0
123#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -0700124#define ENV_SEPARATE_VERSTAGE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500125#define ENV_RMODULE 0
126#define ENV_POSTCAR 1
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200127#define ENV_LIBAGESA 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500128#define ENV_STRING "postcar"
129
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200130#elif defined(__LIBAGESA__)
Julius Werner99f46832018-05-16 14:14:04 -0700131#define ENV_DECOMPRESSOR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200132#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +0200133#define ENV_SEPARATE_ROMSTAGE 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200134#define ENV_RAMSTAGE 0
135#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -0700136#define ENV_SEPARATE_VERSTAGE 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200137#define ENV_RMODULE 0
138#define ENV_POSTCAR 0
139#define ENV_LIBAGESA 1
140#define ENV_STRING "libagesa"
141
Aaron Durbincd96c5c2015-09-04 16:28:15 -0500142#else
143/*
144 * Default case of nothing set for random blob generation using
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200145 * create_class_compiler that isn't bound to a stage.
Aaron Durbincd96c5c2015-09-04 16:28:15 -0500146 */
Julius Werner99f46832018-05-16 14:14:04 -0700147#define ENV_DECOMPRESSOR 0
Aaron Durbincd96c5c2015-09-04 16:28:15 -0500148#define ENV_BOOTBLOCK 0
Arthur Heymansa2bc2542021-05-29 08:10:49 +0200149#define ENV_SEPARATE_ROMSTAGE 0
Aaron Durbincd96c5c2015-09-04 16:28:15 -0500150#define ENV_RAMSTAGE 0
151#define ENV_SMM 0
Julius Werner21a40532020-04-21 16:03:53 -0700152#define ENV_SEPARATE_VERSTAGE 0
Aaron Durbindde76292015-09-05 12:59:26 -0500153#define ENV_RMODULE 0
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500154#define ENV_POSTCAR 0
Kyösti Mälkkia405a582017-03-02 13:01:58 +0200155#define ENV_LIBAGESA 0
Ben Gardneraa5f5b12015-11-19 10:48:47 -0600156#define ENV_STRING "UNKNOWN"
Kyösti Mälkkie8792be2014-02-26 15:19:04 +0200157#endif
Kyösti Mälkkief844012013-06-25 23:17:43 +0300158
Martin Roth20abc352024-01-18 19:32:45 -0700159/* Define helpers about the current architecture, based on toolchain.mk. */
Julius Wernerd3634c12015-11-13 13:28:41 -0800160
161#if defined(__ARCH_arm__)
162#define ENV_ARM 1
163#define ENV_ARM64 0
164#if __COREBOOT_ARM_ARCH__ == 4
165#define ENV_ARMV4 1
166#define ENV_ARMV7 0
Patrick Rudolph5e5c1da2021-11-30 13:56:07 +0100167#define ENV_ARCH "armv4"
Julius Wernerd3634c12015-11-13 13:28:41 -0800168#elif __COREBOOT_ARM_ARCH__ == 7
169#define ENV_ARMV4 0
170#define ENV_ARMV7 1
Patrick Rudolph5e5c1da2021-11-30 13:56:07 +0100171#define ENV_ARCH "armv7"
Hakim Giydan43e5b572016-09-08 10:13:59 -0700172#if defined(__COREBOOT_ARM_V7_A__)
173#define ENV_ARMV7_A 1
174#define ENV_ARMV7_M 0
175#define ENV_ARMV7_R 0
176#elif defined(__COREBOOT_ARM_V7_M__)
177#define ENV_ARMV7_A 0
178#define ENV_ARMV7_M 1
179#define ENV_ARMV7_R 0
180#elif defined(__COREBOOT_ARM_V7_R__)
181#define ENV_ARMV7_A 0
182#define ENV_ARMV7_M 0
183#define ENV_ARMV7_R 1
184#endif
Julius Wernerd3634c12015-11-13 13:28:41 -0800185#else
186#define ENV_ARMV4 0
187#define ENV_ARMV7 0
188#endif
189#define ENV_ARMV8 0
Julius Wernerd3634c12015-11-13 13:28:41 -0800190#define ENV_RISCV 0
191#define ENV_X86 0
192#define ENV_X86_32 0
193#define ENV_X86_64 0
194
195#elif defined(__ARCH_arm64__)
196#define ENV_ARM 0
197#define ENV_ARM64 1
198#define ENV_ARMV4 0
199#define ENV_ARMV7 0
200#if __COREBOOT_ARM_ARCH__ == 8
201#define ENV_ARMV8 1
202#else
203#define ENV_ARMV8 0
204#endif
Julius Wernerd3634c12015-11-13 13:28:41 -0800205#define ENV_RISCV 0
206#define ENV_X86 0
207#define ENV_X86_32 0
208#define ENV_X86_64 0
Patrick Rudolph5e5c1da2021-11-30 13:56:07 +0100209#define ENV_ARCH "aarch64"
Julius Wernerd3634c12015-11-13 13:28:41 -0800210
211#elif defined(__ARCH_riscv__)
212#define ENV_ARM 0
213#define ENV_ARM64 0
214#define ENV_ARMV4 0
215#define ENV_ARMV7 0
216#define ENV_ARMV8 0
Julius Wernerd3634c12015-11-13 13:28:41 -0800217#define ENV_RISCV 1
218#define ENV_X86 0
219#define ENV_X86_32 0
220#define ENV_X86_64 0
Patrick Rudolph5e5c1da2021-11-30 13:56:07 +0100221#define ENV_ARCH "riscv"
Julius Wernerd3634c12015-11-13 13:28:41 -0800222
223#elif defined(__ARCH_x86_32__)
224#define ENV_ARM 0
225#define ENV_ARM64 0
226#define ENV_ARMV4 0
227#define ENV_ARMV7 0
228#define ENV_ARMV8 0
Julius Wernerd3634c12015-11-13 13:28:41 -0800229#define ENV_RISCV 0
230#define ENV_X86 1
231#define ENV_X86_32 1
232#define ENV_X86_64 0
Patrick Rudolph5e5c1da2021-11-30 13:56:07 +0100233#define ENV_ARCH "x86_32"
Julius Wernerd3634c12015-11-13 13:28:41 -0800234
235#elif defined(__ARCH_x86_64__)
236#define ENV_ARM 0
237#define ENV_ARM64 0
238#define ENV_ARMV4 0
239#define ENV_ARMV7 0
240#define ENV_ARMV8 0
Julius Wernerd3634c12015-11-13 13:28:41 -0800241#define ENV_RISCV 0
242#define ENV_X86 1
243#define ENV_X86_32 0
244#define ENV_X86_64 1
Patrick Rudolph5e5c1da2021-11-30 13:56:07 +0100245#define ENV_ARCH "x86_64"
Julius Wernerd3634c12015-11-13 13:28:41 -0800246
247#else
248#define ENV_ARM 0
249#define ENV_ARM64 0
250#define ENV_ARMV4 0
251#define ENV_ARMV7 0
252#define ENV_ARMV8 0
Julius Wernerd3634c12015-11-13 13:28:41 -0800253#define ENV_RISCV 0
254#define ENV_X86 0
255#define ENV_X86_32 0
256#define ENV_X86_64 0
Patrick Rudolph5e5c1da2021-11-30 13:56:07 +0100257#define ENV_ARCH "unknown"
Julius Wernerd3634c12015-11-13 13:28:41 -0800258
259#endif
260
Subrata Banik63022032019-05-11 20:12:20 +0530261#if CONFIG(RAMPAYLOAD)
262/* ENV_PAYLOAD_LOADER is set to ENV_POSTCAR when CONFIG_RAMPAYLOAD is enabled */
263#define ENV_PAYLOAD_LOADER ENV_POSTCAR
264#else
Ronald G. Minnich42493482019-05-09 17:09:25 +0000265/* ENV_PAYLOAD_LOADER is set when you are in a stage that loads the payload.
266 * For now, that is the ramstage. */
267#define ENV_PAYLOAD_LOADER ENV_RAMSTAGE
Subrata Banik63022032019-05-11 20:12:20 +0530268#endif
Ronald G. Minnich42493482019-05-09 17:09:25 +0000269
Kyösti Mälkki21160a72019-08-17 17:29:36 +0300270#define ENV_ROMSTAGE_OR_BEFORE \
Arthur Heymansa2bc2542021-05-29 08:10:49 +0200271 (ENV_DECOMPRESSOR || ENV_BOOTBLOCK || ENV_SEPARATE_ROMSTAGE || \
Martin Rothb9c2ecf2020-06-10 20:35:35 -0600272 (ENV_SEPARATE_VERSTAGE && !CONFIG(VBOOT_STARTS_IN_ROMSTAGE)))
Kyösti Mälkki21160a72019-08-17 17:29:36 +0300273
Kyösti Mälkki7336f972020-06-08 06:05:03 +0300274#if ENV_X86
Kyösti Mälkki21160a72019-08-17 17:29:36 +0300275/* Indicates memory layout is determined with arch/x86/car.ld. */
Martin Roth8418fd42019-04-22 16:26:23 -0600276#define ENV_CACHE_AS_RAM (ENV_ROMSTAGE_OR_BEFORE && !CONFIG(RESET_VECTOR_IN_RAM))
Kyösti Mälkkif2cc52b2019-08-21 07:15:38 +0300277#else
Kyösti Mälkkif2cc52b2019-08-21 07:15:38 +0300278#define ENV_CACHE_AS_RAM 0
279#endif
280
Jeremy Compostellab7832de2023-08-30 15:42:09 -0700281/* Indicates if the stage uses the _data and _bss regions defined in
282 * arch/x86/car.ld */
283#define ENV_SEPARATE_DATA_AND_BSS (ENV_CACHE_AS_RAM && (ENV_BOOTBLOCK || !CONFIG(NO_XIP_EARLY_STAGES)))
Arthur Heymans9efb0c02020-11-30 14:03:51 +0100284
Arthur Heymans7fbef1b2024-02-22 15:01:04 +0100285/* Currently ramstage has heap. */
286#define ENV_HAS_HEAP_SECTION ENV_RAMSTAGE
Kyösti Mälkkif2cc52b2019-08-21 07:15:38 +0300287
Martin Roth44d53472020-07-23 18:27:58 -0600288/* Set USER_SPACE in the makefile for the rare code that runs in userspace */
289#if defined(__USER_SPACE__)
290#define ENV_USER_SPACE 1
291#else
292#define ENV_USER_SPACE 0
293#endif
294
Martin Roth1594e8f2020-07-15 13:57:54 -0600295/* Define the first stage to run */
296#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
297#define ENV_INITIAL_STAGE ENV_SEPARATE_VERSTAGE
298#else
299#define ENV_INITIAL_STAGE ENV_BOOTBLOCK
300#endif
301
Arthur Heymansa2bc2542021-05-29 08:10:49 +0200302#define ENV_CREATES_CBMEM (ENV_SEPARATE_ROMSTAGE || (ENV_BOOTBLOCK && !CONFIG(SEPARATE_ROMSTAGE)))
303#define ENV_HAS_CBMEM (ENV_CREATES_CBMEM || ENV_POSTCAR || ENV_RAMSTAGE)
304#define ENV_RAMINIT (ENV_SEPARATE_ROMSTAGE || (ENV_BOOTBLOCK && !CONFIG(SEPARATE_ROMSTAGE)))
Kyösti Mälkkifa3bc042022-03-31 07:40:10 +0300305
Kyösti Mälkki04c32282021-11-10 03:10:58 +0200306#if ENV_X86
Arthur Heymans6acc05e2022-05-12 18:01:13 +0200307#define ENV_HAS_SPINLOCKS !ENV_ROMSTAGE_OR_BEFORE
Kyösti Mälkki04c32282021-11-10 03:10:58 +0200308#elif ENV_RISCV
Arthur Heymans6acc05e2022-05-12 18:01:13 +0200309#define ENV_HAS_SPINLOCKS 1
Kyösti Mälkki04c32282021-11-10 03:10:58 +0200310#else
Arthur Heymans6acc05e2022-05-12 18:01:13 +0200311#define ENV_HAS_SPINLOCKS 0
Kyösti Mälkki04c32282021-11-10 03:10:58 +0200312#endif
313
314/* When set <arch/smp/spinlock.h> is included for the spinlock implementation. */
Arthur Heymans6acc05e2022-05-12 18:01:13 +0200315#define ENV_SUPPORTS_SMP (CONFIG(SMP) && ENV_HAS_SPINLOCKS)
Kyösti Mälkki04c32282021-11-10 03:10:58 +0200316
Arthur Heymansa2bc2542021-05-29 08:10:49 +0200317#if ENV_X86 && CONFIG(COOP_MULTITASKING) && (ENV_RAMSTAGE || ENV_CREATES_CBMEM)
Raul E Rangeld8f07c12021-11-22 13:43:49 -0700318/* TODO: Enable in all x86 stages */
Arthur Heymans6acc05e2022-05-12 18:01:13 +0200319#define ENV_SUPPORTS_COOP 1
Raul E Rangeld8f07c12021-11-22 13:43:49 -0700320#else
Arthur Heymans6acc05e2022-05-12 18:01:13 +0200321#define ENV_SUPPORTS_COOP 0
Raul E Rangeld8f07c12021-11-22 13:43:49 -0700322#endif
323
Patrick Rudolpha626d272018-04-18 10:13:32 +0200324/**
325 * For pre-DRAM stages and post-CAR always build with simple device model, ie.
326 * PCI, PNP and CPU functions operate without use of devicetree. The reason
327 * post-CAR utilizes __SIMPLE_DEVICE__ is for simplicity. Currently there's
328 * no known requirement that devicetree would be needed during that stage.
329 *
330 * For ramstage individual source file may define __SIMPLE_DEVICE__
331 * before including any header files to force that particular source
332 * be built with simple device model.
Patrick Rudolpha626d272018-04-18 10:13:32 +0200333 */
334
Kyösti Mälkki21160a72019-08-17 17:29:36 +0300335#if !ENV_RAMSTAGE
Patrick Rudolpha626d272018-04-18 10:13:32 +0200336#define __SIMPLE_DEVICE__
337#endif
338
Kyösti Mälkkie8792be2014-02-26 15:19:04 +0200339#endif /* _RULES_H */