[edk2-devel] [PATCH edk2 v2 2/5] Silicon/Hisilicon: Add HISI_SAS_CONFIG_PROTOCOL
Ming Huang
huangming23 at huawei.com
Wed May 27 14:33:55 UTC 2020
Add HISI_SAS_CONFIG_PROTOCOL, provide get sas address interface,
this is prepare for adding update sas address feature.
Signed-off-by: Ming Huang <huangming23 at huawei.com>
---
Silicon/Hisilicon/HisiPkg.dec | 1 +
Silicon/Hisilicon/Include/Protocol/HisiSasConfig.h | 43 ++++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/Silicon/Hisilicon/HisiPkg.dec b/Silicon/Hisilicon/HisiPkg.dec
index 63f50f7..051b5b8 100644
--- a/Silicon/Hisilicon/HisiPkg.dec
+++ b/Silicon/Hisilicon/HisiPkg.dec
@@ -34,6 +34,7 @@
gHisiPlatformSasProtocolGuid = {0x20e9829f, 0x3a2c, 0x479a, {0x9a, 0x93, 0x45, 0x7d, 0x13, 0x50, 0x96, 0x6d}}
gHisiSnpPlatformProtocolGuid = {0x81321f27, 0xff58, 0x4a1d, {0x99, 0x97, 0xd, 0xcc, 0xfa, 0x82, 0xf4, 0x6f}}
gHisiInstalledAcpiProtocolGuid = {0x31505f6a, 0xe496, 0x4c7e, {0xba, 0xbb, 0x71, 0x7b, 0xe2, 0xc4, 0xb4, 0x59}}
+ gHisiSasConfigProtocolGuid = {0x3A236669, 0x6666, 0x4d04, {0xb2, 0x83, 0x7, 0x9f, 0x3c, 0xc4, 0x71, 0x66}}
[Guids]
gHisiTokenSpaceGuid = {0xc8bc553e, 0x12bf, 0x11e6, {0x97, 0x4f, 0x87, 0xf7, 0x7c, 0xfd, 0x52, 0x1d}}
diff --git a/Silicon/Hisilicon/Include/Protocol/HisiSasConfig.h b/Silicon/Hisilicon/Include/Protocol/HisiSasConfig.h
new file mode 100644
index 0000000..6b850c8
--- /dev/null
+++ b/Silicon/Hisilicon/Include/Protocol/HisiSasConfig.h
@@ -0,0 +1,43 @@
+/** @file
+
+ Copyright (c) 2020, Hisilicon Limited. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef HISI_SAS_CONFIG_H_
+#define HISI_SAS_CONFIG_H_
+
+typedef struct{
+ UINT32 CtrlId;
+ BOOLEAN Enable;
+ UINT32 Bar32;
+ UINT64 ResetBase;
+ UINTN Segment;
+ UINTN Bus;
+ UINTN Device;
+ UINTN Fun;
+} SAS_CONTROLLER_DATA;
+
+typedef
+VOID *
+(EFIAPI *HISI_SAS_GET_CONTROLLER_DATA) (
+ VOID
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *HISI_SAS_GET_ADDRESS) (
+ IN UINT8 Index,
+ IN OUT UINT8 *SasAddrBuffer
+ );
+
+typedef struct {
+ HISI_SAS_GET_ADDRESS GetAddr;
+ HISI_SAS_GET_CONTROLLER_DATA GetControllerData;
+} HISI_SAS_CONFIG_PROTOCOL;
+
+extern EFI_GUID gHisiSasConfigProtocolGuid;
+
+#endif
--
2.8.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#60351): https://edk2.groups.io/g/devel/message/60351
Mute This Topic: https://groups.io/mt/74501288/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list