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