ArvernOS
Loading...
Searching...
No Matches
pvh.h File Reference
#include <boot.h>
#include <stdint.h>
Include dependency graph for pvh.h:

Data Structures

struct  hvm_start_info_t
struct  hvm_memmap_table_entry
struct  hvm_modlist_entry
struct  pvh_mmap_t

Macros

#define HVM_START_MAGIC_VALUE   0x336ec578
 Value of hvm_start_info.magic when the structure is valid.

Functions

void pvh_init (hvm_start_info_t *info)
const char * pvh_get_cmdline ()
pvh_mmap_t * pvh_get_mmap ()
void pvh_get_modules_range (uintptr_t *start, uintptr_t *end)
void pvh_get_boot_info (boot_info_t *info)

Detailed Description

See also
https://github.com/xen-project/xen/blob/master/xen/include/public/arch-x86/hvm/start_info.h

This module manages the PVH boot information, which is passed by the bootloader in ebx when the kernel is loaded using the PVH ELF note (see asm/notes.asm).

Function Documentation

◆ pvh_get_boot_info()

void pvh_get_boot_info ( boot_info_t * info)

Fills the boot information from the PVH boot information.

Parameters
infothe boot information to fill

◆ pvh_get_cmdline()

const char * pvh_get_cmdline ( )

Returns the command line, if any.

Returns
a pointer to the command line or 0

◆ pvh_get_mmap()

pvh_mmap_t * pvh_get_mmap ( )

Returns the physical memory map reported by the bootloader.

Returns
a pointer to the physical memory map

◆ pvh_get_modules_range()

void pvh_get_modules_range ( uintptr_t * start,
uintptr_t * end )

Returns the physical address range spanned by all boot modules (e.g. the init ramdisk), if any.

Parameters
startset to the start address of the range, or 0 if there is no boot module
endset to the end address (exclusive) of the range, or 0 if there is no boot module

◆ pvh_init()

void pvh_init ( hvm_start_info_t * info)

Reads the PVH boot information.

Parameters
infothe PVH boot information