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