From: Ming Huang <huangming23@huawei.com>
To: <devel@edk2.groups.io>, <jian.j.wang@intel.com>,
<hao.a.wu@intel.com>, <liming.gao@intel.com>
Cc: <lidongzhan@huawei.com>, <huangming23@huawei.com>,
<songdongkuang@huawei.com>, <wanghuiqiang@huawei.com>,
<qiuliangen@huawei.com>, <shenlimei@huawei.com>
Subject: [PATCH edk2 v2 2/5] Silicon/Hisilicon: Add HISI_SAS_CONFIG_PROTOCOL
Date: Wed, 27 May 2020 22:33:55 +0800 [thread overview]
Message-ID: <1590590038-19724-3-git-send-email-huangming23@huawei.com> (raw)
In-Reply-To: <1590590038-19724-1-git-send-email-huangming23@huawei.com>
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@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
next prev parent reply other threads:[~2020-05-27 14:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 14:33 [PATCH edk2 v2 0/5] Improve D0x Ming Huang
2020-05-27 14:33 ` [PATCH edk2 v2 1/5] Silicon/Hisilicon: Change updating dsdt in ready to boot event Ming Huang
2020-06-08 17:23 ` [edk2-devel] " Leif Lindholm
2020-05-27 14:33 ` Ming Huang [this message]
2020-05-27 14:33 ` [PATCH edk2 v2 3/5] Silicon/Hisilicon/Acpi: Add update sas address feature Ming Huang
2020-06-08 17:15 ` [edk2-devel] " Leif Lindholm
2020-06-09 13:24 ` Ming Huang
2020-06-09 13:28 ` Leif Lindholm
2020-05-27 14:33 ` [PATCH edk2 v2 4/5] Silicon/Hisilicon: Rename EthMac files Ming Huang
2020-05-27 14:33 ` [PATCH edk2 v2 5/5] Silicon/Hisilicon/FlashFvbDxe: Declare missing GUID dependency Ming Huang
2020-06-08 17:21 ` [edk2-devel] " Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1590590038-19724-3-git-send-email-huangming23@huawei.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox