| 1 |
|
| 2 |
|
| 3 |
#ifndef _IMD_PRIVATE_H_ |
| 4 |
#define _IMD_PRIVATE_H_ |
| 5 |
|
| 6 |
#include <cbmem.h> |
| 7 |
#include <commonlib/bsd/helpers.h> |
| 8 |
|
| 9 |
|
| 10 |
struct imd_root_pointer { |
| 11 |
uint32_t magic; |
| 12 |
|
| 13 |
int32_t root_offset; |
| 14 |
} __packed; |
| 15 |
|
| 16 |
struct imd_entry { |
| 17 |
uint32_t magic; |
| 18 |
|
| 19 |
int32_t start_offset; |
| 20 |
uint32_t size; |
| 21 |
uint32_t id; |
| 22 |
} __packed; |
| 23 |
|
| 24 |
struct imd_root { |
| 25 |
uint32_t max_entries; |
| 26 |
uint32_t num_entries; |
| 27 |
uint32_t flags; |
| 28 |
uint32_t entry_align; |
| 29 |
|
| 30 |
int32_t max_offset; |
| 31 |
struct imd_entry entries[]; |
| 32 |
} __packed; |
| 33 |
|
| 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 |
| 38 |
|
| 39 |
#define IMD_FLAG_LOCKED 1 |
| 40 |
|
| 41 |
#endif |