|
iPXE
|
Memory mapping. More...
#include <stdint.h>#include <string.h>#include <errno.h>#include <assert.h>#include <realmode.h>#include <bios.h>#include <memsizes.h>#include <ipxe/io.h>#include <ipxe/memmap.h>Go to the source code of this file.
Data Structures | |
| struct | e820_entry |
| An INT 15,e820 memory map entry. More... | |
Macros | |
| #define | SMAP ( 0x534d4150 ) |
| Magic value for INT 15,e820 calls. More... | |
| #define | E820_TYPE_RAM 1 |
| Normal memory. More... | |
| #define | E820_TYPE_RESERVED 2 |
| Reserved and unavailable. More... | |
| #define | E820_TYPE_ACPI 3 |
| ACPI reclaim memory. More... | |
| #define | E820_TYPE_NVS 4 |
| ACPI NVS memory. More... | |
| #define | E820_ATTR_ENABLED 0x00000001UL |
| #define | E820_ATTR_NONVOLATILE 0x00000002UL |
| #define | E820_ATTR_UNKNOWN 0xfffffffcUL |
| #define | E820_MIN_SIZE 20 |
| #define | e820buf __use_data16 ( e820buf ) |
| #define | memmap_post __use_data16 ( memmap_post ) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static struct e820_entry | __bss16 (e820buf) |
| Buffer for INT 15,e820 calls. More... | |
| uint8_t | __bss16 (memmap_post) |
| We are running during POST; inhibit INT 15,e820 and INT 15,e801. More... | |
| static unsigned int | extmemsize_e801 (void) |
| Get size of extended memory via INT 15,e801. More... | |
| static unsigned int | extmemsize_88 (void) |
| Get size of extended memory via INT 15,88. More... | |
| unsigned int | extmemsize (void) |
| Get size of extended memory. More... | |
| static int | meme820 (struct memmap_region *region) |
| Get e820 memory map. More... | |
| static void | int15_describe (uint64_t min, int hide, struct memmap_region *region) |
| Describe memory region from system memory map. More... | |
| PROVIDE_MEMMAP (int15, memmap_describe, int15_describe) | |
Memory mapping.
Definition in file int15.c.
| #define SMAP ( 0x534d4150 ) |
| #define e820buf __use_data16 ( e820buf ) |
| #define memmap_post __use_data16 ( memmap_post ) |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Buffer for INT 15,e820 calls.
| uint8_t __bss16 | ( | memmap_post | ) |
We are running during POST; inhibit INT 15,e820 and INT 15,e801.
|
static |
Get size of extended memory via INT 15,e801.
| extmem | Extended memory size, in kB, or 0 |
Definition at line 82 of file int15.c.
References __asm__(), __volatile__(), CF, DBG, flags, memmap_post, and REAL_CODE.
Referenced by extmemsize().
|
static |
Get size of extended memory via INT 15,88.
| extmem | Extended memory size, in kB |
Definition at line 139 of file int15.c.
References __asm__(), __volatile__(), DBG, and REAL_CODE.
Referenced by extmemsize().
| unsigned int extmemsize | ( | void | ) |
Get size of extended memory.
| extmem | Extended memory size, in kB |
Note that this is only an approximation; for an accurate picture, use the E820 memory map obtained via memmap_describe();
Definition at line 159 of file int15.c.
References extmemsize_88(), and extmemsize_e801().
Referenced by int15_describe(), and nbi_process_segments().
|
static |
Get e820 memory map.
| region | Memory region of interest to be updated |
| rc | Return status code |
Definition at line 175 of file int15.c.
References __asm__(), __from_data16, __volatile__(), e820_entry::attrs, CF, count, DBG, discard_D, E820_ATTR_ENABLED, E820_ATTR_NONVOLATILE, E820_ATTR_UNKNOWN, E820_MIN_SIZE, E820_TYPE_RAM, e820buf, EINVAL, ENOTSUP, ENOTTY, flags, len, MEMMAP_FL_MEMORY, memmap_post, memmap_update(), memset(), next, offsetof, REAL_CODE, size, SMAP, start, and typeof().
Referenced by int15_describe().
|
static |
Describe memory region from system memory map.
| min | Minimum address |
| hide | Hide in-use regions from the memory map |
| region | Region descriptor to fill in |
Definition at line 312 of file int15.c.
References basememsize(), DBG, extmemsize(), int15_intercept(), meme820(), MEMMAP_FL_INACCESSIBLE, MEMMAP_FL_MEMORY, memmap_init(), memmap_update(), min, NULL, and rc.
| PROVIDE_MEMMAP | ( | int15 | , |
| memmap_describe | , | ||
| int15_describe | |||
| ) |
1.8.15