From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from huawei.com (huawei.com [45.249.212.35]) by mx.groups.io with SMTP id smtpd.web10.7239.1591709399931798402 for ; Tue, 09 Jun 2020 06:30:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.35, mailfrom: huangming23@huawei.com) Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0B6A82142C59AC006A48; Tue, 9 Jun 2020 21:29:58 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Tue, 9 Jun 2020 21:29:51 +0800 From: "Ming Huang" To: , , CC: , , , , , , Subject: [PATCH edk2-platforms v3 2/4] Silicon/Hisilicon: Add HISI_SAS_CONFIG_PROTOCOL Date: Tue, 9 Jun 2020 21:27:23 +0800 Message-ID: <1591709245-44527-3-git-send-email-huangming23@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1591709245-44527-1-git-send-email-huangming23@huawei.com> References: <1591709245-44527-1-git-send-email-huangming23@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Content-Type: text/plain Add HISI_SAS_CONFIG_PROTOCOL, provide get sas address interface, this is prepare for adding update sas address feature. Signed-off-by: Ming Huang --- 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.
+ + 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