summaryrefslogtreecommitdiff
path: root/Silicon/Hisilicon/Include/Protocol
diff options
context:
space:
mode:
Diffstat (limited to 'Silicon/Hisilicon/Include/Protocol')
-rw-r--r--Silicon/Hisilicon/Include/Protocol/HisiBoardNicProtocol.h61
-rw-r--r--Silicon/Hisilicon/Include/Protocol/HisiSpiFlashProtocol.h66
-rw-r--r--Silicon/Hisilicon/Include/Protocol/IpmiInterfaceProtocol.h99
-rw-r--r--Silicon/Hisilicon/Include/Protocol/NorFlashProtocol.h59
-rw-r--r--Silicon/Hisilicon/Include/Protocol/PlatformSasProtocol.h37
5 files changed, 322 insertions, 0 deletions
diff --git a/Silicon/Hisilicon/Include/Protocol/HisiBoardNicProtocol.h b/Silicon/Hisilicon/Include/Protocol/HisiBoardNicProtocol.h
new file mode 100644
index 0000000000..8a9d13c9e7
--- /dev/null
+++ b/Silicon/Hisilicon/Include/Protocol/HisiBoardNicProtocol.h
@@ -0,0 +1,61 @@
+/** @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 _HISI_BOARD_NIC_PROTOCOL_H_
+#define _HISI_BOARD_NIC_PROTOCOL_H_
+
+#define HISI_BOARD_NIC_PROTOCOL_GUID \
+ { 0xb5903955, 0x31e9, 0x4aaf, { 0xb2, 0x83, 0x7, 0x9f, 0x3c, 0xc4, 0x71, 0x66 } }
+
+#define HISI_BOARD_XGE_STATUS_PROTOCOL_GUID \
+ { 0xa6b8ed0e, 0xd8cc, 0x4853, { 0xaa, 0x39, 0x2c, 0x3e, 0xcd, 0x7c, 0xa5, 0x97 } }
+
+typedef
+EFI_STATUS
+(EFIAPI *HISI_BOARD_NIC_GET_MAC_ADDRESS) (
+ IN OUT EFI_MAC_ADDRESS *Mac,
+ IN UINTN Port
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *HISI_BOARD_NIC_SET_MAC_ADDRESS) (
+ IN EFI_MAC_ADDRESS *Mac,
+ IN UINTN Port
+ );
+
+typedef struct {
+ HISI_BOARD_NIC_GET_MAC_ADDRESS GetMac;
+ HISI_BOARD_NIC_SET_MAC_ADDRESS SetMac;
+} HISI_BOARD_NIC_PROTOCOL;
+
+typedef
+VOID
+(*HISI_BOARD_FEEDBACK_XGE_STATUS) (
+ BOOLEAN IsLinkup,
+ BOOLEAN IsActOK,
+ UINT32 port
+ );
+
+typedef struct {
+ HISI_BOARD_FEEDBACK_XGE_STATUS FeedbackXgeStatus;
+} HISI_BOARD_XGE_STATUS_PROTOCOL;
+
+
+extern EFI_GUID gHisiBoardNicProtocolGuid;
+extern EFI_GUID gHisiBoardXgeStatusProtocolGuid;
+
+
+#endif
diff --git a/Silicon/Hisilicon/Include/Protocol/HisiSpiFlashProtocol.h b/Silicon/Hisilicon/Include/Protocol/HisiSpiFlashProtocol.h
new file mode 100644
index 0000000000..b7ed9ceb35
--- /dev/null
+++ b/Silicon/Hisilicon/Include/Protocol/HisiSpiFlashProtocol.h
@@ -0,0 +1,66 @@
+/** @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 _HISI_SPI_FLASH_PROTOCOL_H_
+#define _HISI_SPI_FLASH_PROTOCOL_H_
+
+typedef struct _HISI_SPI_FLASH_PROTOCOL HISI_SPI_FLASH_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *HISI_SPI_FLASH_ERASE_INTERFACE) (
+ IN HISI_SPI_FLASH_PROTOCOL *This,
+ IN UINT32 Offset,
+ IN UINT32 ulLength
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *HISI_SPI_FLASH_WRITE_INTERFACE) (
+ IN HISI_SPI_FLASH_PROTOCOL *This,
+ IN UINT32 Offset,
+ IN UINT8 *Buffer,
+ IN UINT32 ulLength
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *HISI_SPI_FLASH_READ_INTERFACE) (
+ IN HISI_SPI_FLASH_PROTOCOL *This,
+ IN UINT32 Offset,
+ IN OUT UINT8 *Buffer,
+ IN UINT32 ulLength
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *HISI_SPI_FLASH_ERASE_WRITE_INTERFACE) (
+ IN HISI_SPI_FLASH_PROTOCOL *This,
+ IN UINT32 Offset,
+ IN UINT8 *Buffer,
+ IN UINT32 ulLength
+ );
+
+struct _HISI_SPI_FLASH_PROTOCOL {
+ HISI_SPI_FLASH_ERASE_INTERFACE Erase;
+ HISI_SPI_FLASH_WRITE_INTERFACE Write;
+ HISI_SPI_FLASH_READ_INTERFACE Read;
+ HISI_SPI_FLASH_ERASE_WRITE_INTERFACE EraseWrite;
+};
+
+extern EFI_GUID gHisiSpiFlashProtocolGuid;
+
+#endif
diff --git a/Silicon/Hisilicon/Include/Protocol/IpmiInterfaceProtocol.h b/Silicon/Hisilicon/Include/Protocol/IpmiInterfaceProtocol.h
new file mode 100644
index 0000000000..c5f0f8551c
--- /dev/null
+++ b/Silicon/Hisilicon/Include/Protocol/IpmiInterfaceProtocol.h
@@ -0,0 +1,99 @@
+/** @file
+*
+* Copyright (c) 2016, Hisilicon Limited. All rights reserved.
+* Copyright (c) 2016, 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 _IPMI_INTERFACE_PROTOCOL_H_
+#define _IPMI_INTERFACE_PROTOCOL_H_
+
+#define IPMI_INTERFACE_PROTOCOL_GUID \
+ {0xa37e200e, 0xda90, 0x473b, {0x8b, 0xb5, 0x1d, 0x7b, 0x11, 0xba, 0x32, 0x33}}
+
+typedef struct _IPMI_INTERFACE_PROTOCOL IPMI_INTERFACE_PROTOCOL;
+
+//
+// Structure to store IPMI Network Function, LUN and command
+//
+typedef struct {
+ UINT8 Lun : 2;
+ UINT8 NetFn : 6;
+ UINT8 Cmd;
+} IPMI_CMD_HEADER;
+
+//
+// System Interface Type
+//
+typedef enum {
+ IPMI_SYSTEM_INTERFACE_UNKNOWN,
+ IPMI_SYSTEM_INTERFACE_KCS,
+ IPMI_SYSTEM_INTERFACE_SMIC,
+ IPMI_SYSTEM_INTERFACE_BT,
+ IPMI_SYSTEM_INTERFACE_SSIF,
+ IPMI_SYSTEM_INTERFACE_MAX_TYPE
+} IPMI_SYSTEM_INTERFACE_TYPE;
+
+//
+// System Interface Address Type
+//
+typedef enum {
+ IPMI_MEMORY,
+ IPMI_IO,
+ IPMI_MAX_INTERFACE_ADDRESS_TYPE
+} IPMI_INTERFACE_ADDRESS_TYPE;
+
+typedef
+EFI_STATUS
+(EFIAPI *IPMI_INTERFACE_PROTOCOL_EXECUTE_IPMI_CMD) (
+ IN IPMI_INTERFACE_PROTOCOL *This,
+ IN IPMI_CMD_HEADER Request,
+ IN VOID *SendData OPTIONAL,
+ IN UINT8 SendLength,
+ OUT VOID *RecvData,
+ OUT UINT8 *RecvLength,
+ OUT UINT16 *StatusCodes OPTIONAL
+);
+typedef
+IPMI_SYSTEM_INTERFACE_TYPE
+(EFIAPI *IPMI_INTERFACE_PROTOCOL_GET_IPMI_INTERFACE_TYPE) (
+ IN IPMI_INTERFACE_PROTOCOL *This
+);
+typedef
+UINT16
+(EFIAPI *IPMI_INTERFACE_PROTOCOL_GET_IPMI_BASE_ADDRESS) (
+ IN IPMI_INTERFACE_PROTOCOL *This
+);
+typedef
+IPMI_INTERFACE_ADDRESS_TYPE
+(EFIAPI *IPMI_INTERFACE_PROTOCOL_GET_IPMI_BASE_ADDRESS_TYPE) (
+ IN IPMI_INTERFACE_PROTOCOL *This
+);
+typedef
+UINT8
+(EFIAPI *IPMI_INTERFACE_PROTOCOL_GET_IPMI_VERSION) (
+ IN IPMI_INTERFACE_PROTOCOL *This
+);
+
+//
+// Structure of IPMI_INTERFACE_PROTOCOL
+//
+struct _IPMI_INTERFACE_PROTOCOL{
+ IPMI_INTERFACE_PROTOCOL_EXECUTE_IPMI_CMD ExecuteIpmiCmd;
+ IPMI_INTERFACE_PROTOCOL_GET_IPMI_INTERFACE_TYPE GetIpmiInterfaceType;
+ IPMI_INTERFACE_PROTOCOL_GET_IPMI_BASE_ADDRESS GetIpmiBaseAddress;
+ IPMI_INTERFACE_PROTOCOL_GET_IPMI_BASE_ADDRESS_TYPE GetIpmiBaseAddressType;
+ IPMI_INTERFACE_PROTOCOL_GET_IPMI_VERSION GetIpmiVersion;
+} ;
+
+extern EFI_GUID gIpmiInterfaceProtocolGuid;
+
+#endif
diff --git a/Silicon/Hisilicon/Include/Protocol/NorFlashProtocol.h b/Silicon/Hisilicon/Include/Protocol/NorFlashProtocol.h
new file mode 100644
index 0000000000..29e9de80c0
--- /dev/null
+++ b/Silicon/Hisilicon/Include/Protocol/NorFlashProtocol.h
@@ -0,0 +1,59 @@
+/** @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 _NOR_FLASH_PROTOCOL_H_
+#define _NOR_FLASH_PROTOCOL_H_
+
+#define UNI_NOR_FLASH_PROTOCOL_GUID \
+ {0x86F305EA, 0xDFAC, 0x4A6B, {0x92, 0x77, 0x47, 0x31, 0x2E, 0xCE, 0x42, 0xA}}
+
+typedef struct _UNI_NOR_FLASH_PROTOCOL UNI_NOR_FLASH_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *UNI_FLASH_ERASE_INTERFACE) (
+ IN UNI_NOR_FLASH_PROTOCOL *This,
+ IN UINT32 Offset,
+ IN UINT32 Length
+ );
+typedef
+EFI_STATUS
+(EFIAPI *UNI_FLASH_WRITE_INTERFACE) (
+ IN UNI_NOR_FLASH_PROTOCOL *This,
+ IN UINT32 Offset,
+ IN UINT8 *Buffer,
+ UINT32 ulLength
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *UNI_FLASH_READ_INTERFACE) (
+ IN UNI_NOR_FLASH_PROTOCOL *This,
+ IN UINT32 Offset,
+ IN OUT UINT8 *Buffer,
+ IN UINT32 ulLen
+ );
+
+
+struct _UNI_NOR_FLASH_PROTOCOL {
+ UNI_FLASH_ERASE_INTERFACE Erase;
+ UNI_FLASH_WRITE_INTERFACE Write;
+ UNI_FLASH_READ_INTERFACE Read;
+};
+
+extern EFI_GUID gUniNorFlashProtocolGuid;
+
+#endif
diff --git a/Silicon/Hisilicon/Include/Protocol/PlatformSasProtocol.h b/Silicon/Hisilicon/Include/Protocol/PlatformSasProtocol.h
new file mode 100644
index 0000000000..1e1892b011
--- /dev/null
+++ b/Silicon/Hisilicon/Include/Protocol/PlatformSasProtocol.h
@@ -0,0 +1,37 @@
+/** @file
+*
+* Copyright (c) 2016, Hisilicon Limited. All rights reserved.
+* Copyright (c) 2016, 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 _PLATFORM_SAS_PROTOCOL_H_
+#define _PLATFORM_SAS_PROTOCOL_H_
+
+#define PLATFORM_SAS_PROTOCOL_GUID \
+ { \
+ 0x40e9829f, 0x3a2c, 0x479a, 0x9a, 0x93, 0x45, 0x7d, 0x13, 0x50, 0x96, 0x5d \
+ }
+
+typedef struct _PLATFORM_SAS_PROTOCOL PLATFORM_SAS_PROTOCOL;
+
+typedef
+VOID
+(EFIAPI * SAS_INIT) (
+ IN PLATFORM_SAS_PROTOCOL *This
+);
+
+struct _PLATFORM_SAS_PROTOCOL {
+ IN UINT64 BaseAddr;
+ SAS_INIT Init;
+};
+
+#endif