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 
14 #ifdef MEMMAP_NULL
15 #define MEMMAP_PREFIX_null
16 #else
17 #define MEMMAP_PREFIX_null __null_
18 #endif
19 
20 /**
21  * Describe memory region from system memory map
22  *
23  * @v min Minimum address
24  * @v hide Hide in-use regions from the memory map
25  * @v region Region descriptor to fill in
26  */
27 static inline __attribute__ (( always_inline )) void
29  struct memmap_region *region ) {
30 
31  /* Initialise region as empty */
32  memmap_init ( min, region );
33 }
34 
35 /**
36  * Synchronise in-use regions with the externally visible system memory map
37  *
38  */
39 static inline __attribute__ (( always_inline )) void
40 MEMMAP_INLINE ( null, memmap_sync ) ( void ) {
41  /* Nothing to do */
42 }
43 
44 #endif /* _IPXE_NULL_MEMMAP_H */
static __attribute__((always_inline)) void MEMMAP_INLINE(null
Describe memory region from system memory map.
#define min(x, y)
Definition: ath.h:35
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:40
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:25
static memmap_describe(uint64_t min, int hide __unused, struct memmap_region *region)
Describe memory region from system memory map.
Definition: null_memmap.h:28
A memory region descriptor.
Definition: memmap.h:48
static void memmap_init(uint64_t min, struct memmap_region *region)
Initialise memory region descriptor.
Definition: memmap.h:71