The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/hypercall.asm to Ia32/hypercall.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16314 6f19259b-4bc3-4df7-8a09-765794883524
		
			
				
	
	
		
			26 lines
		
	
	
		
			559 B
		
	
	
	
		
			NASM
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			559 B
		
	
	
	
		
			NASM
		
	
	
	
	
	
SECTION .text
 | 
						|
 | 
						|
; INTN
 | 
						|
; EFIAPI
 | 
						|
; XenHypercall2 (
 | 
						|
;   IN     VOID *HypercallAddr,
 | 
						|
;   IN OUT INTN Arg1,
 | 
						|
;   IN OUT INTN Arg2
 | 
						|
;   );
 | 
						|
global ASM_PFX(XenHypercall2)
 | 
						|
ASM_PFX(XenHypercall2):
 | 
						|
  ; 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
 | 
						|
 |