vaseboot/include/VasEBoot/xen_file.h

61 lines
1.9 KiB
C

/*
* VasEBoot -- GRand Unified Bootloader
* Copyright (C) 2013 Free Software Foundation, Inc.
*
* VasEBoot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VasEBoot is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VasEBoot. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VasEBoot_XEN_FILE_HEADER
#define VasEBoot_XEN_FILE_HEADER 1
#include <VasEBoot/types.h>
#include <VasEBoot/elf.h>
#include <VasEBoot/elfload.h>
VasEBoot_elf_t VasEBoot_xen_file (VasEBoot_file_t file);
VasEBoot_elf_t VasEBoot_xen_file_and_cmdline (VasEBoot_file_t file,
char *cmdline,
VasEBoot_size_t cmdline_max_len);
struct VasEBoot_xen_file_info
{
VasEBoot_uint64_t kern_start, kern_end;
VasEBoot_uint64_t virt_base;
VasEBoot_uint64_t entry_point;
VasEBoot_uint64_t hypercall_page;
VasEBoot_uint64_t paddr_offset;
VasEBoot_uint64_t p2m_base;
int has_hypercall_page;
int has_note;
int has_xen_guest;
int has_p2m_base;
int extended_cr3;
int unmapped_initrd;
enum
{
VasEBoot_XEN_FILE_I386 = 1,
VasEBoot_XEN_FILE_I386_PAE = 2,
VasEBoot_XEN_FILE_I386_PAE_BIMODE = 3,
VasEBoot_XEN_FILE_X86_64 = 4
} arch;
};
VasEBoot_err_t
VasEBoot_xen_get_info32 (VasEBoot_elf_t elf, struct VasEBoot_xen_file_info *xi);
VasEBoot_err_t
VasEBoot_xen_get_info64 (VasEBoot_elf_t elf, struct VasEBoot_xen_file_info *xi);
VasEBoot_err_t VasEBoot_xen_get_info (VasEBoot_elf_t elf, struct VasEBoot_xen_file_info *xi);
#endif