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 
12 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13 FILE_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  */
28 static 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  */
40 static inline __attribute__ (( always_inline )) void
41 MEMMAP_INLINE ( null, memmap_sync ) ( void ) {
42  /* Nothing to do */
43 }
44 
45 #endif /* _IPXE_NULL_MEMMAP_H */
FILE_SECBOOT(PERMITTED)
static __attribute__((always_inline)) void MEMMAP_INLINE(null
Describe memory region from system memory map.
#define min(x, y)
Definition: ath.h:36
unsigned long long uint64_t
Definition: stdint.h:13
static memmap_sync(void)
Synchronise in-use regions with the externally visible system memory map.
Definition: null_memmap.h:41
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define __unused
Declare a variable or data structure as unused.
Definition: compiler.h:573
#define MEMMAP_INLINE(_subsys, _api_func)
Calculate static inline memory map API function name.
Definition: memmap.h:26
static memmap_describe(uint64_t min, int hide __unused, struct memmap_region *region)
Describe memory region from system memory map.
Definition: null_memmap.h:29
A memory region descriptor.
Definition: memmap.h:49
static void memmap_init(uint64_t min, struct memmap_region *region)
Initialise memory region descriptor.
Definition: memmap.h:72