; This code provides low level routines that support the Virtual Machine.\r
; for option ROMs.\r
; \r
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
; This program and the accompanying materials\r
; are licensed and made available under the terms and conditions of the BSD License\r
; which accompanies this distribution. The full text of the license may be found at\r
; Equate files needed.\r
;---------------------------------------------------------------------------\r
\r
-text SEGMENT\r
+.CODE\r
\r
-;---------------------------------------------------------------------------\r
-;;GenericPostSegment SEGMENT USE16\r
-;---------------------------------------------------------------------------\r
+CopyMem PROTO Destination:PTR DWORD, Source:PTR DWORD, Count:DWORD\r
\r
;****************************************************************************\r
; EbcLLCALLEX\r
;\r
; Destroys no working registers.\r
;****************************************************************************\r
-; VOID EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)\r
-\r
-CopyMem PROTO Destination:PTR DWORD, Source:PTR DWORD, Count:DWORD\r
-\r
-\r
+; INT64 EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)\r
EbcLLCALLEXNative PROC PUBLIC\r
push rbp\r
push rbx\r
; The contents of the register in which the entry point is passed.\r
;\r
EbcLLGetEbcEntryPoint PROC PUBLIC\r
+ ; The EbcEntryPoint is saved to R10.\r
mov rax, r10\r
ret\r
EbcLLGetEbcEntryPoint ENDP\r
\r
-;/*++\r
-;\r
-;Routine Description:\r
-;\r
-; Return the caller's value of the stack pointer.\r
-;\r
-;Arguments:\r
-;\r
-; None.\r
-;\r
-;Returns:\r
-;\r
-; The current value of the stack pointer for the caller. We\r
-; adjust it by 4 here because when they called us, the return address\r
-; is put on the stack, thereby lowering it by 4 bytes.\r
-;\r
-;--*/\r
-\r
-; UINTN EbcLLGetStackPointer()\r
-EbcLLGetStackPointer PROC PUBLIC\r
- mov rax, rsp ; get current stack pointer\r
- ; Stack adjusted by this much when we were called,\r
- ; For this function, it's 4.\r
- add rax, 4\r
- ret\r
-EbcLLGetStackPointer ENDP\r
-\r
-; UINT64 EbcLLGetReturnValue(VOID);\r
-; Routine Description:\r
-; When EBC calls native, on return the VM has to stuff the return\r
-; value into a VM register. It's assumed here that the value is still\r
-; in the register, so simply return and the caller should get the\r
-; return result properly.\r
-;\r
-; Arguments:\r
-; None.\r
-;\r
-; Returns:\r
-; The unmodified value returned by the native code.\r
-;\r
-EbcLLGetReturnValue PROC PUBLIC\r
- ret\r
-EbcLLGetReturnValue ENDP\r
-\r
-text ENDS\r
END\r
\r