# This code provides low level routines that support the Virtual Machine\r
# for option ROMs.\r
# \r
-# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 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
-#---------------------------------------------------------------------------\r
-##GenericPostSegment SEGMENT USE16\r
-#---------------------------------------------------------------------------\r
+ASM_GLOBAL ASM_PFX(CopyMem);\r
\r
#****************************************************************************\r
# EbcLLCALLEX\r
#\r
# Destroys no working registers.\r
#****************************************************************************\r
-ASM_GLOBAL _CopyMem;\r
-\r
# VOID EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)\r
ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative);\r
ASM_PFX(EbcLLCALLEXNative):\r
ASM_PFX(EbcLLGetEbcEntryPoint):\r
mov %r10, %rax\r
ret\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
-ASM_GLOBAL ASM_PFX(EbcLLGetStackPointer);\r
-ASM_PFX(EbcLLGetStackPointer):\r
- mov %rsp, %rax\r
- # Stack adjusted by this much when we were called,\r
- # For this function, it's 4.\r
- add $4, %rax\r
- ret\r
-\r
-ASM_GLOBAL ASM_PFX(EbcLLGetReturnValue);\r
-ASM_PFX(EbcLLGetReturnValue):\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
- ret\r