xen: Add basic hooks for PVH in current code

Add the hooks to current code needed for Xen PVH. They will be filled
with code later when the related functionality is being added.

loader/i386/linux.c needs to include machine/kernel.h now as it needs
to get GRUB_KERNEL_USE_RSDP_ADDR from there. This in turn requires to
add an empty kernel.h header for some i386 platforms (efi, coreboot,
ieee1275, xen) and for x86_64 efi.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Hans van Kranenburg <hans@knorrie.org>
This commit is contained in:
Juergen Gross 2018-12-07 13:11:37 +01:00 committed by Daniel Kiper
parent 53a92dea8b
commit 0b3e4eb2d2
12 changed files with 112 additions and 0 deletions

View file

View file

View file

View file

View file

@ -0,0 +1,30 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2018 Free Software Foundation, Inc.
*
* GRUB 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.
*
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_KERNEL_MACHINE_HEADER
#define GRUB_KERNEL_MACHINE_HEADER 1
#ifndef ASM_FILE
#define GRUB_KERNEL_USE_RSDP_ADDR 1
extern grub_uint64_t EXPORT_VAR(grub_rsdp_addr);
#endif /* ! ASM_FILE */
#endif /* GRUB_KERNEL_MACHINE_HEADER */

View file

View file

@ -95,6 +95,11 @@ typedef grub_uint64_t grub_xen_mfn_t;
typedef grub_uint32_t grub_xen_mfn_t;
#endif
typedef unsigned int grub_xen_evtchn_t;
#ifdef GRUB_MACHINE_XEN_PVH
extern struct hvm_start_info *pvh_start_info;
void grub_xen_setup_pvh (void);
#endif
#endif
#endif