|
iPXE
|
Memory map settings. More...
#include <string.h>#include <errno.h>#include <byteswap.h>#include <ipxe/init.h>#include <ipxe/settings.h>#include <ipxe/memmap.h>Go to the source code of this file.
Macros | |
| #define | MEMMAP_TAG(start, count, include_start, include_length, ignore, scale) |
| Construct memory map setting tag. More... | |
| #define | MEMMAP_COUNT(tag) ( ( ( (tag) >> 24 ) & 0xff ) + 1 ) |
| Extract number of regions from setting tag. More... | |
| #define | MEMMAP_START(tag) ( ( (tag) >> 16 ) & 0xff ) |
| Extract starting region from setting tag. More... | |
| #define | MEMMAP_IGNORE_NONEXISTENT(tag) ( (tag) & 0x00000400UL ) |
| Extract ignore flag from setting tag. More... | |
| #define | MEMMAP_INCLUDE_LENGTH(tag) ( (tag) & 0x00000200UL ) |
| Extract length inclusion flag from setting tag. More... | |
| #define | MEMMAP_INCLUDE_START(tag) ( (tag) & 0x00000100UL ) |
| Extract start address inclusion flag from setting tag. More... | |
| #define | MEMMAP_SCALE(tag) ( (tag) & 0x3f ) |
| Extract scale factor from setting tag. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static int | memmap_settings_applies (struct settings *settings __unused, const struct setting *setting) |
| Check applicability of memory map setting. More... | |
| static int | memmap_settings_fetch (struct settings *settings, struct setting *setting, void *data, size_t len) |
| Fetch value of memory map setting. More... | |
| static void | memmap_settings_init (void) |
| Initialise memory map settings. More... | |
| struct init_fn memmap_settings_init_fn | __init_fn (INIT_NORMAL) |
| Memory map settings initialiser. More... | |
| const struct setting memsize_setting | __setting (SETTING_MISC, memsize) |
| Memory map predefined settings. More... | |
Variables | |
| static const struct settings_scope | memmap_settings_scope |
| Memory map settings scope. More... | |
| static struct settings_operations | memmap_settings_operations |
| Memory map settings operations. More... | |
| static struct settings | memmap_settings |
| Memory map settings. More... | |
Memory map settings.
Memory map settings are numerically encoded as:
Bits 31-24 Number of regions, minus one Bits 23-16 Starting region Bits 15-11 Unused Bit 10 Ignore non-existent regions (rather than generating an error) Bit 9 Include length Bit 8 Include start address Bits 7-6 Unused Bits 5-0 Scale factor (i.e. right shift count)
Definition in file memmap_settings.c.
Construct memory map setting tag.
| start | Starting region |
| count | Number of regions |
| include_start | Include start address |
| include_length | Include length |
| ignore | Ignore non-existent regions |
| scale | Scale factor |
| tag | Setting tag |
Definition at line 60 of file memmap_settings.c.
Extract number of regions from setting tag.
| tag | Setting tag |
| count | Number of regions |
Definition at line 72 of file memmap_settings.c.
Extract starting region from setting tag.
| tag | Setting tag |
| start | Starting region |
Definition at line 80 of file memmap_settings.c.
Extract ignore flag from setting tag.
| tag | Setting tag |
| ignore | Ignore non-existent regions |
Definition at line 88 of file memmap_settings.c.
Extract length inclusion flag from setting tag.
| tag | Setting tag |
| include_length | Include length |
Definition at line 96 of file memmap_settings.c.
Extract start address inclusion flag from setting tag.
| tag | Setting tag |
| include_start | Include start address |
Definition at line 104 of file memmap_settings.c.
Extract scale factor from setting tag.
| tag | Setting tag |
| scale | Scale factor |
Definition at line 112 of file memmap_settings.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Check applicability of memory map setting.
| settings | Settings block |
| setting | Setting |
| applies | Setting applies within this settings block |
Definition at line 124 of file memmap_settings.c.
References memmap_settings_scope, and setting::scope.
|
static |
Fetch value of memory map setting.
| settings | Settings block |
| setting | Setting to fetch |
| data | Buffer to fill with setting data |
| len | Length of buffer |
| len | Length of setting data, or negative error |
Definition at line 139 of file memmap_settings.c.
References count, cpu_to_be64, data, DBGC, ENOENT, memmap_region::flags, for_each_memmap, index, len, memcpy(), MEMMAP_COUNT, MEMMAP_FL_MEMORY, MEMMAP_IGNORE_NONEXISTENT, MEMMAP_INCLUDE_LENGTH, MEMMAP_INCLUDE_START, MEMMAP_SCALE, memmap_size(), MEMMAP_START, memmap_region::min, result, start, setting::tag, and setting::type.
|
static |
Initialise memory map settings.
Definition at line 233 of file memmap_settings.c.
References DBG, memmap_settings, NULL, rc, register_settings(), and strerror().
| struct init_fn memmap_settings_init_fn __init_fn | ( | INIT_NORMAL | ) |
Memory map settings initialiser.
| const struct setting memsize_setting __setting | ( | SETTING_MISC | , |
| memsize | |||
| ) |
Memory map predefined settings.
|
static |
Memory map settings scope.
Definition at line 115 of file memmap_settings.c.
Referenced by memmap_settings_applies().
|
static |
Memory map settings operations.
Definition at line 218 of file memmap_settings.c.
|
static |
Memory map settings.
Definition at line 224 of file memmap_settings.c.
Referenced by memmap_settings_init().
1.8.15