]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ipf/ReadApplicationRegister.c
1. Simplify the implementation of AsmReadApplicationRegister() & AsmReadControlRegist...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ipf / ReadApplicationRegister.c
diff --git a/MdePkg/Library/BaseLib/Ipf/ReadApplicationRegister.c b/MdePkg/Library/BaseLib/Ipf/ReadApplicationRegister.c
deleted file mode 100644 (file)
index 818e6ac..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/** @file\r
-  Implementation of Application Register reading functions on Itanium platform.\r
-\r
-  Copyright (c) 2008, Intel Corporation<BR>\r
-  All rights reserved. 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
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "BaseLibInternals.h"\r
-\r
-\r
-//\r
-// Loop up table for Index and corresponding application register access routines. \r
-//\r
-GLOBAL_REMOVE_IF_UNREFERENCED REGISTER_ENTRY mApplicationRegisterAccessEntries[] = {\r
-  {IPF_APPLICATION_REGISTER_K0, AsmReadApplicationRegisterK0},\r
-  {IPF_APPLICATION_REGISTER_K1, AsmReadApplicationRegisterK1},\r
-  {IPF_APPLICATION_REGISTER_K2, AsmReadApplicationRegisterK2},\r
-  {IPF_APPLICATION_REGISTER_K3, AsmReadApplicationRegisterK3},\r
-  {IPF_APPLICATION_REGISTER_K4, AsmReadApplicationRegisterK4},\r
-  {IPF_APPLICATION_REGISTER_K5, AsmReadApplicationRegisterK5},\r
-  {IPF_APPLICATION_REGISTER_K6, AsmReadApplicationRegisterK6},\r
-  {IPF_APPLICATION_REGISTER_K7, AsmReadApplicationRegisterK7},\r
-  {IPF_APPLICATION_REGISTER_RSC, AsmReadApplicationRegisterRsc},\r
-  {IPF_APPLICATION_REGISTER_BSP, AsmReadApplicationRegisterBsp},\r
-  {IPF_APPLICATION_REGISTER_BSPSTORE, AsmReadApplicationRegisterBspstore},\r
-  {IPF_APPLICATION_REGISTER_RNAT, AsmReadApplicationRegisterRnat},\r
-  {IPF_APPLICATION_REGISTER_FCR, AsmReadApplicationRegisterFcr},\r
-  {IPF_APPLICATION_REGISTER_EFLAG, AsmReadApplicationRegisterEflag},\r
-  {IPF_APPLICATION_REGISTER_CSD, AsmReadApplicationRegisterCsd},\r
-  {IPF_APPLICATION_REGISTER_SSD, AsmReadApplicationRegisterSsd},\r
-  {IPF_APPLICATION_REGISTER_CFLG, AsmReadApplicationRegisterCflg},\r
-  {IPF_APPLICATION_REGISTER_FSR, AsmReadApplicationRegisterFsr},\r
-  {IPF_APPLICATION_REGISTER_FIR, AsmReadApplicationRegisterFir},\r
-  {IPF_APPLICATION_REGISTER_FDR, AsmReadApplicationRegisterFdr},\r
-  {IPF_APPLICATION_REGISTER_CCV, AsmReadApplicationRegisterCcv},\r
-  {IPF_APPLICATION_REGISTER_UNAT, AsmReadApplicationRegisterUnat},\r
-  {IPF_APPLICATION_REGISTER_FPSR, AsmReadApplicationRegisterFpsr},\r
-  {IPF_APPLICATION_REGISTER_ITC, AsmReadApplicationRegisterItc},\r
-  {IPF_APPLICATION_REGISTER_PFS, AsmReadApplicationRegisterPfs},\r
-  {IPF_APPLICATION_REGISTER_LC, AsmReadApplicationRegisterLc},\r
-  {IPF_APPLICATION_REGISTER_EC, AsmReadApplicationRegisterEc}\r
-};\r
-\r
-\r
-/**\r
-  Reads a 64-bit application register.\r
-\r
-  Reads and returns the application register specified by Index. The valid Index valued are defined\r
-  above in "Related Definitions".\r
-  If Index is invalid then 0xFFFFFFFFFFFFFFFF is returned.  This function is only available on IPF.\r
-\r
-  @param  Index                     The index of the application register to read.\r
-\r
-  @return The application register specified by Index.\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-AsmReadApplicationRegister (\r
-  IN UINT64  Index\r
-  )\r
-{\r
-  UINTN   Item;\r
-\r
-  for (Item = 0; Item < sizeof (mApplicationRegisterAccessEntries) / sizeof (mApplicationRegisterAccessEntries[0]); Item++) {\r
-    if (mApplicationRegisterAccessEntries[Item].Index == Index) {\r
-      return mApplicationRegisterAccessEntries[Item].Function ();\r
-    }\r
-  }\r
-\r
-  return 0xFFFFFFFFFFFFFFFF;\r
-}\r