blob: f8babb8218301aa84af5a7bb005be35a6a15d129 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/** @file
Header file for Base IPC library.
Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __INTERNAL_IPC_LIB_H__
#define __INTERNAL_IPC_LIB_H__
//
// Consumed library classes
//
#include <Library/IoLib.h>
#include <Library/DebugLib.h>
#include <Library/I2CLib.h>
//
// Produced library class
//
#include <Library/PmcIpcLib.h>
//
// PMC IPC1 Register Base Address
// This base address will be dynamically changed during PCI enum
//
/**
Checks the IPC channel is available for a new request.
@param[in] BaseAddress The base address of the IPC register bank.
@retval EFI_SUCCESS Ready for a new IPC.
@retval EFI_NOT_READY Not ready for a new IPC.
**/
RETURN_STATUS
InternalReadyForNewIpc (
IN UINTN BaseAddress
);
/**
Sends an IPC from the x86 CPU to the PMC and waits for the PMC to process the
specified opcode.
@param[in] BaseAddress The base address of the IPC register bank
@param[in] MessageId The message identifier to send in the IPC packet.
@param[in] CommandID The SubCommand identifier to send in the IPC packet.
@param[in, out] Buffer Pointer to buffer associated with MessageId. This is an optional
patrametert that may be NULL for some MessageId values.
@param[in, out] BufferSize The size, in bytes, of Buffer. Ignored if Buffer is NULL.
@retval IPC_STATUS.Uint32
**/
UINT32
InternalIpcSendCommandEx (
IN UINTN BaseAddress,
IN UINT32 MessageId,
IN UINT8 CommandId,
IN OUT VOID *Buffer, OPTIONAL
IN OUT UINTN BufferSize
);
#endif
|