summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/null_memmap.h
blob: 122280d142a7d3959019507be8d4bebda75e11ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _IPXE_NULL_MEMMAP_H
#define _IPXE_NULL_MEMMAP_H

#include <stdint.h>

/** @file
 *
 * Null system memory map API
 *
 */

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
FILE_SECBOOT ( PERMITTED );

#ifdef MEMMAP_NULL
#define MEMMAP_PREFIX_null
#else
#define MEMMAP_PREFIX_null __null_
#endif

/**
 * Describe memory region from system memory map
 *
 * @v min		Minimum address
 * @v hide		Hide in-use regions from the memory map
 * @v region		Region descriptor to fill in
 */
static inline __attribute__ (( always_inline )) void
MEMMAP_INLINE ( null, memmap_describe ) ( uint64_t min, int hide __unused,
					  struct memmap_region *region ) {

	/* Initialise region as empty */
	memmap_init ( min, region );
}

/**
 * Synchronise in-use regions with the externally visible system memory map
 *
 */
static inline __attribute__ (( always_inline )) void
MEMMAP_INLINE ( null, memmap_sync ) ( void ) {
	/* Nothing to do */
}

#endif /* _IPXE_NULL_MEMMAP_H */