summaryrefslogtreecommitdiff
path: root/Silicon/Hisilicon/Include/Library/OemMiscLib.h
blob: 6f18c0fa720427eb8c13dbd311d2919a1f566879 (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
/** @file
*
*  Copyright (c) 2015, Hisilicon Limited. All rights reserved.
*  Copyright (c) 2015, Linaro Limited. All rights reserved.
*
*  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 _OEM_MISC_LIB_H_
#define _OEM_MISC_LIB_H_

#include <Uefi.h>

#include <PlatformArch.h>
#include <Library/I2CLib.h>

#define PCIEDEVICE_REPORT_MAX      4
typedef struct _REPORT_PCIEDIDVID2BMC{
    UINTN   Bus;
    UINTN   Device;
    UINTN   Function;
    UINTN   Slot;
}REPORT_PCIEDIDVID2BMC;
extern REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX];

BOOLEAN OemIsSocketPresent (UINTN Socket);
VOID CoreSelectBoot(VOID);
VOID OemPcieResetAndOffReset(void);
extern I2C_DEVICE gDS3231RtcDevice;

UINTN OemGetSocketNumber(VOID);
UINTN OemGetDdrChannel (VOID);
UINTN OemGetDimmSlot(UINTN Socket, UINTN Channel);

BOOLEAN OemIsMpBoot();
UINT32 OemIsWarmBoot();

VOID OemBiosSwitch(UINT32 Master);
BOOLEAN OemIsNeedDisableExpanderBuffer(VOID);

extern EFI_STRING_ID gDimmToDevLocator[MAX_SOCKET][MAX_CHANNEL][MAX_DIMM];
EFI_HII_HANDLE EFIAPI OemGetPackages ();
#endif