Home | History | Annotate | Download | only in BasePalLibNull
      1 /** @file
      2 
      3   Template and Sample instance of PalCallLib.
      4 
      5   Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
      6   This program and the accompanying materials
      7   are licensed and made available under the terms and conditions of the BSD License
      8   which accompanies this distribution.  The full text of the license may be found at
      9   http://opensource.org/licenses/bsd-license.php.
     10 
     11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13 
     14 **/
     15 
     16 #include <Base.h>
     17 #include <Library/PalLib.h>
     18 #include <Library/DebugLib.h>
     19 
     20 /**
     21   Makes a PAL procedure call.
     22 
     23   This is a wrapper function to make a PAL procedure call.  Based on the Index value,
     24   this API will make static or stacked PAL call. Architected procedures may be designated
     25   as required or optional.  If a PAL procedure is specified as optional, a unique return
     26   code of 0xFFFFFFFFFFFFFFFF is returned in the Status field of the PAL_CALL_RETURN structure.
     27   This indicates that the procedure is not present in this PAL implementation.  It is the
     28   caller's responsibility to check for this return code after calling any optional PAL
     29   procedure. No parameter checking is performed on the 4 input parameters, but there are
     30   some common rules that the caller should follow when making a PAL call.  Any address
     31   passed to PAL as buffers for return parameters must be 8-byte aligned.  Unaligned addresses
     32   may cause undefined results.  For those parameters defined as reserved or some fields
     33   defined as reserved must be zero filled or the invalid argument return value may be
     34   returned or undefined result may occur during the execution of the procedure.
     35   This function is only available on IPF.
     36 
     37   @param Index  The PAL procedure Index number.
     38   @param Arg2   The 2nd parameter for PAL procedure calls.
     39   @param Arg3   The 3rd parameter for PAL procedure calls.
     40   @param Arg4   The 4th parameter for PAL procedure calls.
     41 
     42   @return The structure returned from the PAL Call procedure, including the status and return value.
     43 
     44 **/
     45 PAL_CALL_RETURN
     46 EFIAPI
     47 PalCall (
     48   IN UINT64                  Index,
     49   IN UINT64                  Arg2,
     50   IN UINT64                  Arg3,
     51   IN UINT64                  Arg4
     52   )
     53 {
     54   PAL_CALL_RETURN Ret;
     55 
     56   Ret.Status = (UINT64) -1;
     57   ASSERT (!RETURN_ERROR (RETURN_UNSUPPORTED));
     58   return Ret;
     59 }
     60