iPXE
null_memmap.h
Go to the documentation of this file.
1#ifndef _IPXE_NULL_MEMMAP_H
2#define _IPXE_NULL_MEMMAP_H
3
4#include <stdint.h>
5
6/** @file
7 *
8 * Null system memory map API
9 *
10 */
11
12FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13FILE_SECBOOT ( PERMITTED );
14
15#ifdef MEMMAP_NULL
16#define MEMMAP_PREFIX_null
17#else
18#define MEMMAP_PREFIX_null __null_
19#endif
20
21/**
22 * Describe memory region from system memory map
23 *
24 * @v min Minimum address
25 * @v hide Hide in-use regions from the memory map
26 * @v region Region descriptor to fill in
27 */
28static inline __attribute__ (( always_inline )) void
30 struct memmap_region *region ) {
31
32 /* Initialise region as empty */
33 memmap_init ( min, region );
34}
35
36/**
37 * Synchronise in-use regions with the externally visible system memory map
38 *
39 */
40static inline __attribute__ (( always_inline )) void
41MEMMAP_INLINE ( null, memmap_sync ) ( void ) {
42 /* Nothing to do */
43}
44
45#endif /* _IPXE_NULL_MEMMAP_H */
unsigned long long uint64_t
Definition stdint.h:13
#define min(x, y)
Definition ath.h:36
static memmap_sync(void)
Synchronise in-use regions with the externally visible system memory map.
Definition fdtmem.h:26
#define __unused
Declare a variable or data structure as unused.
Definition compiler.h:573
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define __attribute__(x)
Definition compiler.h:10
void memmap_describe(uint64_t min, int hide, struct memmap_region *region)
Describe memory region from system memory map.
Definition null_memmap.h:29
#define MEMMAP_INLINE(_subsys, _api_func)
Calculate static inline memory map API function name.
Definition memmap.h:26
static void memmap_init(uint64_t min, struct memmap_region *region)
Initialise memory region descriptor.
Definition memmap.h:72
A memory region descriptor.
Definition memmap.h:49