]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/XenResetVector: Allow jumpstart from either hvmloader or PVH
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 13 Aug 2019 11:30:52 +0000 (12:30 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 21 Aug 2019 16:03:49 +0000 (18:03 +0200)
commitf198e254f709951bc02c032769f351c12ac4b54d
treecabfa2aa05b1eb06a478582a714424742a07fa28
parent93314ae597b3c4c22d1120319fc1669bfb717694
OvmfPkg/XenResetVector: Allow jumpstart from either hvmloader or PVH

This patch allows the ResetVector to be run indenpendently from build
time addresses.

The goal of the patch is to avoid having to create RAM just below 4G
when creating a Xen PVH guest while being compatible with the way
hvmloader currently load OVMF, just below 4G.

Only the new PVH entry point will do the calculation.

The ResetVector will figure out its current running address by creating
a temporary stack, make a call and calculate the difference between the
build time address and the address at run time.

This patch copies and make the necessary modification to some other asm
files:
- copy of UefiCpuPkg/.../Flat32ToFlat64.asm:
  Allow Transition32FlatTo64Flat to be run from anywhere in memory
- copy of UefiCpuPkg/../SearchForBfvBase.asm:
  Add a extra parameter to indicate where to start the search for the
  boot firmware volume.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190813113119.14804-9-anthony.perard@citrix.com>
OvmfPkg/XenResetVector/Ia16/Real16ToFlat32.asm
OvmfPkg/XenResetVector/Ia32/Flat32ToFlat64.asm [new file with mode: 0644]
OvmfPkg/XenResetVector/Ia32/SearchForBfvBase.asm [new file with mode: 0644]
OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm