--- /dev/null
+SECTION .text\r
+\r
+; INTN\r
+; EFIAPI\r
+; __XenHypercall2 (\r
+; IN VOID *HypercallAddr,\r
+; IN OUT INTN Arg1,\r
+; IN OUT INTN Arg2\r
+; );\r
+global ASM_PFX(__XenHypercall2)\r
+ASM_PFX(__XenHypercall2):\r
+ ; Save only ebx, ecx is supposed to be a scratch register and needs to be\r
+ ; saved by the caller\r
+ push ebx\r
+ ; Copy HypercallAddr to eax\r
+ mov eax, [esp + 8]\r
+ ; Copy Arg1 to the register expected by Xen\r
+ mov ebx, [esp + 12]\r
+ ; Copy Arg2 to the register expected by Xen\r
+ mov ecx, [esp + 16]\r
+ ; Call HypercallAddr\r
+ call eax\r
+ pop ebx\r
+ ret\r
+\r