include/imd: Improve API documentation
Signed-off-by: Jan Dabros <jsd@semihalf.com> Change-Id: I8261c7d933435ba9f29fc3172cdfe8bcae5c1af9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44664 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
This commit is contained in:
parent
f67f3a6626
commit
28d4c2e907
|
@ -40,11 +40,13 @@
|
|||
struct imd_entry;
|
||||
struct imd;
|
||||
|
||||
static const size_t LIMIT_ALIGN = 4096;
|
||||
|
||||
/*
|
||||
* Initialize handle to use for working with an imd. Upper limit is the
|
||||
* exclusive address to start allocating down from. This function needs
|
||||
* to be called at least once before any other imd related functions
|
||||
* can be used.
|
||||
* exclusive address (aligned down to LIMIT_ALIGN) to start allocating down
|
||||
* from. This function needs to be called at least once before any other imd
|
||||
* related functions can be used.
|
||||
*/
|
||||
void imd_handle_init(struct imd *imd, void *upper_limit);
|
||||
|
||||
|
@ -60,7 +62,9 @@ void imd_handle_init_partial_recovery(struct imd *imd);
|
|||
* Create an empty imd with a specified root_size and each entry is aligned to
|
||||
* the provided entry_align. As noted above the root size encompasses the
|
||||
* root pointer and root block leading to the number of imd entries being a
|
||||
* function of the root_size parameter.
|
||||
* function of the root_size parameter. Please note, that one entry is allocated
|
||||
* for covering root region, thus caller should consider this calculating
|
||||
* root_size.
|
||||
*/
|
||||
int imd_create_empty(struct imd *imd, size_t root_size, size_t entry_align);
|
||||
|
||||
|
@ -101,7 +105,7 @@ const struct imd_entry *imd_entry_find(const struct imd *imd, uint32_t id);
|
|||
const struct imd_entry *imd_entry_find_or_add(const struct imd *imd,
|
||||
uint32_t id, size_t size);
|
||||
|
||||
/* Returns size of entry or 0 on failure. */
|
||||
/* Returns size of entry. */
|
||||
size_t imd_entry_size(const struct imd_entry *entry);
|
||||
|
||||
/* Returns pointer to region described by entry or NULL on failure. */
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
static const uint32_t IMD_ROOT_PTR_MAGIC = 0xc0389481;
|
||||
static const uint32_t IMD_ENTRY_MAGIC = ~0xc0389481;
|
||||
static const uint32_t SMALL_REGION_ID = CBMEM_ID_IMD_SMALL;
|
||||
static const size_t LIMIT_ALIGN = 4096;
|
||||
|
||||
/* In-memory data structures. */
|
||||
struct imd_root_pointer {
|
||||
|
|
Loading…
Reference in New Issue