LF OS
Hobby operating system for amd64 with high ambitions
|
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | LoaderStruct |
Main interface between loader and kernel. More... | |
struct | MemoryRegion |
Describes a single memory region. More... | |
struct | FileDescriptor |
Macros | |
#define | MEMORY_REGION_USABLE (1ULL << 0) |
memory is free to be used | |
#define | MEMORY_REGION_FIRMWARE (1ULL << 1) |
memory is in use by the firmware | |
#define | MEMORY_REGION_CODE (1ULL << 2) |
memory holds code | |
#define | MEMORY_REGION_RO (1ULL << 3) |
memory supports being mapped read-only | |
#define | MEMORY_REGION_NV (1ULL << 4) |
memory is non-volatile | |
#define | MEMORY_REGION_MORE_RELIABLE (1ULL << 5) |
memory is more reliable than other memory in the system | |
#define | MEMORY_REGION_UC (1ULL << 16) |
supports uncachable | |
#define | MEMORY_REGION_WC (1ULL << 17) |
supports write-combine | |
#define | MEMORY_REGION_WT (1ULL << 18) |
supports write-through | |
#define | MEMORY_REGION_WB (1ULL << 19) |
supports write-back | |
#define | MEMORY_REGION_UCE (1ULL << 20) |
supports uncacheable, exported and "fetch and add" semaphore mechanism | |
#define | MEMORY_REGION_WP (1ULL << 21) |
Supports write-protected. | |
#define | MEMORY_REGION_RP (1ULL << 22) |
Supports read-protected. | |
#define | MEMORY_REGION_XP (1ULL << 23) |
Supports execute-protected. | |
Functions | |
struct LoaderStruct | __attribute__ ((packed)) |
Variables | |
static const uint64_t | LFOS_LOADER_SIGNATURE = 0x17a15174545c8b4f |
uint64_t | signature |
Signature. always 0x17a15174545c8b4f. | |
uint16_t | size |
Size of the loaded file. | |
ptr_t | fb_location |
Location of framebuffer as physical address. | |
uint16_t | fb_width |
Width of the framebuffer in visible pixels. | |
uint16_t | fb_height |
Height of the framebuffer in pixels. | |
uint8_t | fb_bpp |
Bytes per pixel for the framebuffer. | |
uint8_t | fb_reserved1 |
reserved location | |
uint16_t | fb_stride |
Pixels per scanline (including invisible pixels) | |
uint64_t | num_mem_desc |
Number of memory descriptors. | |
uint64_t | num_files |
Number of loaded files. | |
ptr_t | firmware_info |
Firmware info data, e.g. EFI_SYSTEM_TABLE on UEFI. | |
ptr_t | start_address |
Start of the region as physical address. | |
size_t | num_pages |
Number of pages, where page size is 4096 bytes. | |
uint64_t | flags |
Flags for the memory region. See MEMORY_REGION_ defines. | |
char | name [256] |
Zero terminated string with the name of the file. | |
uint64_t | offset |
Offset where the file contents are located after LoaderStruct. | |
struct LoaderStruct |
Data Fields | ||
---|---|---|
uint8_t | fb_bpp | Bytes per pixel for the framebuffer. |
uint16_t | fb_height | Height of the framebuffer in pixels. |
ptr_t | fb_location | Location of framebuffer as physical address. |
uint8_t | fb_reserved1 | reserved location |
uint16_t | fb_stride | Pixels per scanline (including invisible pixels) |
uint16_t | fb_width | Width of the framebuffer in visible pixels. |
ptr_t | firmware_info | Firmware info data, e.g. EFI_SYSTEM_TABLE on UEFI. |
uint64_t | num_files | Number of loaded files. |
uint64_t | num_mem_desc | Number of memory descriptors. |
uint64_t | signature | Signature. always 0x17a15174545c8b4f. |
uint16_t | size |
Size of this structure, allowing us to add fields at the end for new features. |
struct MemoryRegion |
struct FileDescriptor |
Data Fields | ||
---|---|---|
char | name[256] | Zero terminated string with the name of the file. |
uint64_t | offset | Offset where the file contents are located after LoaderStruct. |
uint64_t | size | Size of the loaded file. |
#define MEMORY_REGION_FIRMWARE (1ULL << 1) |
#define MEMORY_REGION_MORE_RELIABLE (1ULL << 5) |
#define MEMORY_REGION_RO (1ULL << 3) |
#define MEMORY_REGION_RP (1ULL << 22) |
#define MEMORY_REGION_UCE (1ULL << 20) |
#define MEMORY_REGION_USABLE (1ULL << 0) |
#define MEMORY_REGION_WC (1ULL << 17) |
#define MEMORY_REGION_WP (1ULL << 21) |
#define MEMORY_REGION_WT (1ULL << 18) |
#define MEMORY_REGION_XP (1ULL << 23) |
struct LoaderStruct __attribute__ | ( | (packed) | ) |
Definition at line 28 of file hpet.c.
References _reserved1.
ptr_t fb_location |
uint16_t fb_stride |
uint16_t fb_width |
ptr_t firmware_info |
uint64_t flags |
|
static |
uint32_t name |
size_t num_pages |
uint64_t offset |
Offset where the file contents are located after LoaderStruct.
uint64_t size |