Files
system76-edk2/OvmfPkg/XenBusDxe/Ia32/hypercall.asm
Anthony PERARD abcbbb14a4 OvmfPkg/XenBusDxe: Add support to make Xen Hypercalls.
Change in V4:
- Replace the license by the commonly used file header text.
- add file header to XenHypercall.h (license, copyright, brief desc)

Change in V3:
- adding IA32 support. (not reviewed yet)
  both XenBusDxe/Ia32/hypercall.{S,asm} file are new

Change in V2:
- file header, copyright
- Add License
- Add push/pop instruction.
- fix types
- Comment of exported functions
- Improve coding style
- Add error handling in the main init function (of the drivers)
- Comment assembly

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16260 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-29 06:49:10 +00:00

27 lines
540 B
NASM

.code
; INTN
; EFIAPI
; XenHypercall2 (
; IN VOID *HypercallAddr,
; IN OUT INTN Arg1,
; IN OUT INTN Arg2
; );
XenHypercall2 PROC
; Save only ebx, ecx is supposed to be a scratch register and needs to be
; saved by the caller
push ebx
; Copy HypercallAddr to eax
mov eax, [esp + 8]
; Copy Arg1 to the register expected by Xen
mov ebx, [esp + 12]
; Copy Arg2 to the register expected by Xen
mov ecx, [esp + 16]
; Call HypercallAddr
call eax
pop ebx
ret
XenHypercall2 ENDP
END