mb/google/fatcat: Suppress unnecessary extra space in device trees
[coreboot2.git] / src / include / imd_private.h
blob3ff6a518aa97dec3c4f5e1c7fa93d0caa621eb2c
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _IMD_PRIVATE_H_
4 #define _IMD_PRIVATE_H_
6 #include <cbmem.h>
7 #include <commonlib/bsd/helpers.h>
9 /* In-memory data structures. */
10 struct imd_root_pointer {
11 uint32_t magic;
12 /* Relative to upper limit/offset. */
13 int32_t root_offset;
14 } __packed;
16 struct imd_entry {
17 uint32_t magic;
18 /* start is located relative to imd_root */
19 int32_t start_offset;
20 uint32_t size;
21 uint32_t id;
22 } __packed;
24 struct imd_root {
25 uint32_t max_entries;
26 uint32_t num_entries;
27 uint32_t flags;
28 uint32_t entry_align;
29 /* Used for fixing the size of an imd. Relative to the root. */
30 int32_t max_offset;
31 struct imd_entry entries[];
32 } __packed;
34 #define IMD_ROOT_PTR_MAGIC 0xc0389481
35 #define IMD_ENTRY_MAGIC (~0xc0389481)
36 #define SMALL_REGION_ID CBMEM_ID_IMD_SMALL
37 #define LIMIT_ALIGN 4096
39 #define IMD_FLAG_LOCKED 1
41 #endif /* _IMD_PRIVATE_H */