From patchwork Tue Sep 19 13:56:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 112999 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4969699qgf; Tue, 19 Sep 2017 07:13:45 -0700 (PDT) X-Received: by 10.107.82.13 with SMTP id g13mr2323626iob.214.1505830425269; Tue, 19 Sep 2017 07:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505830425; cv=none; d=google.com; s=arc-20160816; b=RF6EWsS8H+KNiQDgyY0MvyjI+JAnmR2fzvKY4z8dUy0UzgxSmme9TlaBlk35D+iUL6 YHRjpssQGkrz7+hd6HmnoHCmLmK4yZj4lGn6MwzdfuHAnBSQLuzagICDi3w6hbk/iLo+ mV1+DZNr8LDBk1y6LsTsjkA2hdlf/MMMlv38Ug99iiLz9cdJEBC2an8SGhARpw4N/7z2 lfjL0ILjMF55eOqV3bMViE92p2LQKPBUpBGISw/UsPXxTZibArvSUY/M7mpwgItF+ntZ yxtKp4wgwhYZEbdBKFmyif0g4Ufqpp5XbCmWln6uKGGmoHSScMvOGbBchAjO4sjcpxg8 VMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=S6+xqD0JI08Rq46fHYk9Pbs5Rfmxjp6n6Q46dKmIouE=; b=eH+4b3pyKUokaf2kMI7ofDnXZK2ddV34S9hk4BwUO7X/SnwQ3lR0gOqPq2TCGI3IKI LKwHLqOoNYoo5H+hXMJLbQQbKQXWyGqFTvme22xQTUL2l5h/+op7TbMPVgsu4aHQ10jK /KgP3czEYZVxwA1pTR4COq+4jUIfWzOvhDRPT0S/GWQq+6nzHvCKTCPSKspwnKVmBW+Q gDtrKtVF7Gxw7YlYVEI3H4IV7omCCDSs2fBf8w29HJYPSPg3nLjkJF5zUE5GFi30RZkn AuAAa+OsUkV8Tud2E43sCSYBSM+U1djYQi3KoKNdK+QhJ+VwBMGy7TIYNpnH//QfFdpD fF2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 143si1544345ite.134.2017.09.19.07.13.44; Tue, 19 Sep 2017 07:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0DF0862D0D; Tue, 19 Sep 2017 14:13:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id A4BE262DF4; Tue, 19 Sep 2017 14:10:05 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6C42E62C7E; Tue, 19 Sep 2017 14:05:47 +0000 (UTC) Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by lists.linaro.org (Postfix) with ESMTPS id 0ACE962CED for ; Tue, 19 Sep 2017 14:05:21 +0000 (UTC) Received: by mail-pf0-f177.google.com with SMTP id l188so34862pfc.6 for ; Tue, 19 Sep 2017 07:05:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Cf6eH10hjMI93A+WO9XBlXL+uoULB5n5HGVqnWakNF0=; b=hpkYezaPUl8ZlfRJqlEgZ4NL2U/Wn00O/pIw5TrxiAtzoZYgBcwUtDXKhze9v7m2c6 RRfeIr+aKwPnmkqT/xWxIiAeQ0r1ruoQPNtufqviK6BGVM8b4/7vsxfgirw0p4dRs7vA KsnHBh8J1rzzG6hF7U7TbIGwL8s0I1yFmm5JFjA6PdIvPLQL2lKTKxI2OVSpFuCaMsXJ tiWz+OQXKb1LLzkF35egB/157GPNhn4v7qFQY2N+0ulkrr0K3uqihNKRAO8BJO349GSn uSgItzZIiGcvfzASzzZwJdaIokQIjalVsrMpArh6eFCJpUTAz1+sKVr/kV0JNphAPHCc BFOA== X-Gm-Message-State: AHPjjUjFDugqBqW+q6n8GBjLmH+AzqIQwEaPDqmGe4EHwocXPmGOvGsp uAILlG5mxzap0RRA2AFKWswsrTL7 X-Google-Smtp-Source: AOwi7QB5Law23brc8V7ZcbC4UqSt7xHmlpIlHTnPSJO/OnTvzdhNjGoPxsMS2FDTPLbllnCU0YPPdw== X-Received: by 10.101.82.202 with SMTP id z10mr1434262pgp.176.1505829920155; Tue, 19 Sep 2017 07:05:20 -0700 (PDT) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id 13sm4390439pfm.138.2017.09.19.07.05.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Sep 2017 07:05:19 -0700 (PDT) From: Heyi Guo To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, graeme.gregory@linaro.org Date: Tue, 19 Sep 2017 21:56:16 +0800 Message-Id: <1505829398-52214-11-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505829398-52214-1-git-send-email-heyi.guo@linaro.org> References: <1505829398-52214-1-git-send-email-heyi.guo@linaro.org> Cc: huangming23@huawei.com, zhangjinsong2@huawei.com, wangzhou , Yi Li , guoheyi@huawei.com, Chenhui Sun , wanghuiqiang@huawei.com Subject: [Linaro-uefi] [linaro-uefi v1 10/32] Hisilicon/D05: add smmu support in IORT table X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" From: Chenhui Sun Signed-off-by: wangzhou Signed-off-by: Chenhui Sun Signed-off-by: Yi Li --- Chips/Hisilicon/Hi1616/D05AcpiTables/D05Iort.asl | 315 ++++++++++++++++++++++- 1 file changed, 307 insertions(+), 8 deletions(-) diff --git a/Chips/Hisilicon/Hi1616/D05AcpiTables/D05Iort.asl b/Chips/Hisilicon/Hi1616/D05AcpiTables/D05Iort.asl index 50ccac1..420cd20 100644 --- a/Chips/Hisilicon/Hi1616/D05AcpiTables/D05Iort.asl +++ b/Chips/Hisilicon/Hi1616/D05AcpiTables/D05Iort.asl @@ -109,7 +109,145 @@ [0004] ItsCount : 00000001 [0004] Identifiers : 00000007 +//f4 +/* 1P NA PCIe SMMU */ +[0001] Type : 04 +[0002] Length : 0050 +[0001] Revision : 00 +[0004] Reserved : 00000000 +[0004] Mapping Count : 00000001 +[0004] Mapping Offset : 0000003C + +[0008] Base Address : a0040000 +[0004] Flags (decoded below) : 00000001 + COHACC Override : 1 + HTTU Override : 0 +[0004] Reserved : 00000000 +[0008] VATOS Address : 0 +[0004] Model : 00000002 +[0004] Event Interrupt : 00000000 +[0004] PRI Interrupt : 00000000 +[0004] GERR Interrupt : 00000000 +[0004] Sync Interrupt : 00000000 +/* this is the map for PCIe2 in 1P NA */ +[0004] Input base : 00028000 +[0004] ID Count : 00000800 +[0004] Output Base : 00008000 +[0004] Output Reference : 00000064 +[0004] Flags (decoded below) : 00000000 + Single Mapping : 0 + +//144 +/* 2P NB PCIe SMMU */ +[0001] Type : 04 +[0002] Length : 0064 +[0001] Revision : 00 +[0004] Reserved : 00000000 +[0004] Mapping Count : 00000001 +[0004] Mapping Offset : 0000003C + +[0008] Base Address : 700a0040000 +[0004] Flags (decoded below) : 00000001 + COHACC Override : 1 + HTTU Override : 0 +[0004] Reserved : 00000000 +[0008] VATOS Address : 0 +[0004] Model : 00000002 +[0004] Event Interrupt : 00000000 +[0004] PRI Interrupt : 00000000 +[0004] GERR Interrupt : 00000000 +[0004] Sync Interrupt : 00000000 +/* this is the map for pcie0 in 2p nb */ +[0004] Input base : 00002000 +[0004] Id count : 00001000 +[0004] Output base : 00002000 +[0004] Output reference : 00000064 +[0004] Flags (decoded below) : 00000000 + Single mapping : 0 +/* this is the map for PCIe1 in 2P NB */ +[0004] Input base : 00013000 +[0004] ID Count : 00001000 +[0004] Output Base : 00003000 +[0004] Output Reference : 00000064 +[0004] Flags (decoded below) : 00000000 + Single Mapping : 0 + +//1a8 +[088h 0136 1] Type : 04 +[089h 0137 2] Length : 003C +[08Bh 0139 1] Revision : 00 +[08Ch 0140 4] Reserved : 00000000 +[090h 0144 4] Mapping Count : 00000000 +[094h 0148 4] Mapping Offset : 0000003C + +[098h 0152 8] Base Address : 00000000C0040000 +[0A0h 0160 4] Flags (decoded below) : 00000001 + COHACC Override : 1 + HTTU Override : 0 +[0A4h 0164 4] Reserved : 00000000 +[0A8h 0168 8] VATOS Address : 0000000000000000 +[0B0h 0176 4] Model : 00000002 +[0B4h 0180 4] Event GSIV : 00000000 +[0B8h 0184 4] PRI GSIV : 00000000 +[0BCh 0188 4] GERR GSIV : 00000000 +[0C0h 0192 4] Sync GSIV : 00000000 + + +//1e4 +/* 1P NB PCIe SMMU */ +[0001] Type : 04 +[0002] Length : 0050 +[0001] Revision : 00 +[0004] Reserved : 00000000 +[0004] Mapping Count : 00000001 +[0004] Mapping Offset : 0000003C + +[0008] Base Address : 8a0040000 +[0004] Flags (decoded below) : 00000001 + COHACC Override : 1 + HTTU Override : 0 +[0004] Reserved : 00000000 +[0008] VATOS Address : 0 +[0004] Model : 00000002 +[0004] Event Interrupt : 00000000 +[0004] PRI Interrupt : 00000000 +[0004] GERR Interrupt : 00000000 +[0004] Sync Interrupt : 00000000 +/* this is the map for PCIe0 in 1P NB */ +[0004] Input base : 00008800 +[0004] ID Count : 00000800 +[0004] Output Base : 00008800 +[0004] Output Reference : 00000064 +[0004] Flags (decoded below) : 00000000 + Single Mapping : 0 + +//234 +/* 2P NA PCIe SMMU */ +[0001] Type : 04 +[0002] Length : 0050 +[0001] Revision : 00 +[0004] Reserved : 00000000 +[0004] Mapping Count : 00000001 +[0004] Mapping Offset : 0000003C +[0008] Base Address : 600a0040000 +[0004] Flags (decoded below) : 00000001 + COHACC Override : 1 + HTTU Override : 0 +[0004] Reserved : 00000000 +[0008] VATOS Address : 0 +[0004] Model : 00000002 +[0004] Event Interrupt : 00000000 +[0004] PRI Interrupt : 00000000 +[0004] GERR Interrupt : 00000000 +[0004] Sync Interrupt : 00000000 +/* this is the map for PCIe2 in 2P NA */ +[0004] Input base : 00021000 +[0004] ID Count : 00001000 +[0004] Output Base : 00001000 +[0004] Output Reference : 00000064 +[0004] Flags (decoded below) : 00000000 + Single Mapping : 0 /* mbi-gen peri b, named component */ [0001] Type : 01 @@ -414,8 +552,8 @@ [0004] Input base : 00008000 [0004] ID Count : 00000800 -[0004] Output Base : 00008000 -[0004] Output Reference : 00000064 +[0004] Output Base : 00028000 +[0004] Output Reference : 000000f4 [0004] Flags (decoded below) : 00000000 Single Mapping : 0 /* 1P NB PCIe0 */ @@ -443,7 +581,7 @@ [0004] Input base : 00008800 [0004] ID Count : 00000800 [0004] Output Base : 00008800 -[0004] Output Reference : 0000007c +[0004] Output Reference : 000001e4 [0004] Flags (decoded below) : 00000000 Single Mapping : 0 @@ -556,8 +694,8 @@ [0004] Input base : 00001000 [0004] ID Count : 00001000 -[0004] Output Base : 00001000 -[0004] Output Reference : 000000c4 +[0004] Output Base : 00021000 +[0004] Output Reference : 00000234 [0004] Flags (decoded below) : 00000000 Single Mapping : 0 @@ -586,7 +724,7 @@ [0004] Input base : 00002000 [0004] ID Count : 00001000 [0004] Output Base : 00002000 -[0004] Output Reference : 000000dc +[0004] Output Reference : 00000144 [0004] Flags (decoded below) : 00000000 Single Mapping : 0 @@ -614,8 +752,8 @@ [0004] Input base : 00003000 [0004] ID Count : 00001000 -[0004] Output Base : 00003000 -[0004] Output Reference : 000000dc +[0004] Output Base : 00013000 +[0004] Output Reference : 00000144 [0004] Flags (decoded below) : 00000000 Single Mapping : 0 @@ -649,3 +787,164 @@ [0004] Output Reference : 000000c4 [0004] Flags (decoded below) : 00000001 Single Mapping : 1 + +[320h 0800 1] Type : 01 +[321h 0801 2] Length : 0040 +[323h 0803 1] Revision : 00 +[324h 0804 4] Reserved : 00000000 +[328h 0808 4] Mapping Count : 00000001 +[32Ch 0812 4] Mapping Offset : 0000002C + +[330h 0816 4] Node Flags : 00000000 +[334h 0820 8] Memory Properties : [IORT Memory Access Properties] +[334h 0820 4] Cache Coherency : 00000000 +[338h 0824 1] Hints (decoded below) : 00 + Transient : 0 + Write Allocate : 0 + Read Allocate : 0 + Override : 0 +[339h 0825 2] Reserved : 0000 +[33Bh 0827 1] Memory Flags (decoded below) : 00 + Coherency : 0 + Device Attribute : 0 +[33Ch 0828 1] Memory Size Limit : 00 +[33Dh 0829 11] Device Name : "\_SB_.USB0" +[348h 0840 24] Padding : \ + 00 00 00 00 00 00 00 00 01 00 00 00 80 00 04 00 \ + 4C 00 00 00 01 00 00 00 + +[34Ch 0844 4] Input base : 00000000 +[350h 0848 4] ID Count : 00000001 +[354h 0852 4] Output Base : 00040080 +[358h 0856 4] Output Reference : 000000F4 +[35Ch 0860 4] Flags (decoded below) : 00000001 + Single Mapping : 1 + +[360h 0864 1] Type : 01 +[361h 0865 2] Length : 0040 +[363h 0867 1] Revision : 00 +[364h 0868 4] Reserved : 00000000 +[368h 0872 4] Mapping Count : 00000001 +[36Ch 0876 4] Mapping Offset : 0000002C + +[370h 0880 4] Node Flags : 00000000 +[374h 0884 8] Memory Properties : [IORT Memory Access Properties] +[374h 0884 4] Cache Coherency : 00000000 +[378h 0888 1] Hints (decoded below) : 00 + Transient : 0 + Write Allocate : 0 + Read Allocate : 0 + Override : 0 +[379h 0889 2] Reserved : 0000 +[37Bh 0891 1] Memory Flags (decoded below) : 00 + Coherency : 0 + Device Attribute : 0 +[37Ch 0892 1] Memory Size Limit : 00 +[37Dh 0893 11] Device Name : "\_SB_.SAS0" +[388h 0904 24] Padding : \ + 00 00 00 00 00 00 00 00 01 00 00 00 00 01 00 00 \ + 88 00 00 00 01 00 00 00 + +[38Ch 0908 4] Input base : 00000000 +[390h 0912 4] ID Count : 00000001 +[394h 0916 4] Output Base : 00040900 +[398h 0920 4] Output Reference : 000001a8 +[39Ch 0924 4] Flags (decoded below) : 00000001 + Single Mapping : 1 + +[3A0h 0928 1] Type : 01 +[3A1h 0929 2] Length : 0040 +[3A3h 0931 1] Revision : 00 +[3A4h 0932 4] Reserved : 00000000 +[3A8h 0936 4] Mapping Count : 00000001 +[3ACh 0940 4] Mapping Offset : 0000002C + +[3B0h 0944 4] Node Flags : 00000000 +[3B4h 0948 8] Memory Properties : [IORT Memory Access Properties] +[3B4h 0948 4] Cache Coherency : 00000000 +[3B8h 0952 1] Hints (decoded below) : 00 + Transient : 0 + Write Allocate : 0 + Read Allocate : 0 + Override : 0 +[3B9h 0953 2] Reserved : 0000 +[3BBh 0955 1] Memory Flags (decoded below) : 00 + Coherency : 0 + Device Attribute : 0 +[3BCh 0956 1] Memory Size Limit : 00 +[3BDh 0957 11] Device Name : "\_SB_.SAS1" +[3C8h 0968 24] Padding : \ + 00 00 00 00 00 00 00 00 01 00 00 00 00 00 04 00 \ + 4C 00 00 00 01 00 00 00 + +[3CCh 0972 4] Input base : 00000000 +[3D0h 0976 4] ID Count : 00000001 +[3D4h 0980 4] Output Base : 00040000 +[3D8h 0984 4] Output Reference : 000000F4 +[3DCh 0988 4] Flags (decoded below) : 00000001 + Single Mapping : 1 + +[3E0h 0992 1] Type : 01 +[3E1h 0993 2] Length : 0040 +[3E3h 0995 1] Revision : 00 +[3E4h 0996 4] Reserved : 00000000 +[3E8h 1000 4] Mapping Count : 00000001 +[3ECh 1004 4] Mapping Offset : 0000002C + +[3F0h 1008 4] Node Flags : 00000000 +[3F4h 1012 8] Memory Properties : [IORT Memory Access Properties] +[3F4h 1012 4] Cache Coherency : 00000000 +[3F8h 1016 1] Hints (decoded below) : 00 + Transient : 0 + Write Allocate : 0 + Read Allocate : 0 + Override : 0 +[3F9h 1017 2] Reserved : 0000 +[3FBh 1019 1] Memory Flags (decoded below) : 00 + Coherency : 0 + Device Attribute : 0 +[3FCh 1020 1] Memory Size Limit : 00 +[3FDh 1021 11] Device Name : "\_SB_.SAS2" +[408h 1032 24] Padding : \ + 00 00 00 00 00 00 00 00 01 00 00 00 40 00 04 00 \ + 4C 00 00 00 01 00 00 00 + +[40Ch 1036 4] Input base : 00000000 +[410h 1040 4] ID Count : 00000001 +[414h 1044 4] Output Base : 00040040 +[418h 1048 4] Output Reference : 000000F4 +[41Ch 1052 4] Flags (decoded below) : 00000001 + Single Mapping : 1 + +/*HNS smmu*/ +[420h 1056 1] Type : 01 +[421h 1057 2] Length : 0040 +[423h 1059 1] Revision : 00 +[424h 1060 4] Reserved : 00000000 +[428h 1064 4] Mapping Count : 00000001 +[42Ch 1068 4] Mapping Offset : 0000002C + +[430h 1072 4] Node Flags : 00000000 +[434h 1076 8] Memory Properties : [IORT Memory Access Properties] +[434h 1076 4] Cache Coherency : 00000000 +[438h 1080 1] Hints (decoded below) : 00 + Transient : 0 + Write Allocate : 0 + Read Allocate : 0 + Override : 0 +[439h 1081 2] Reserved : 0000 +[43Bh 1083 1] Memory Flags (decoded below) : 00 + Coherency : 0 + Device Attribute : 0 +[43Ch 1084 1] Memory Size Limit : 00 +[43Dh 1085 11] Device Name : "\_SB_.DSF0" +[448h 1096 24] Padding : \ + 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 \ + 94 01 00 00 01 00 00 00 + +[44Ch 1100 4] Input base : 00000000 +[450h 1104 4] ID Count : 00000001 +[454h 1108 4] Output Base : 00000000 +[458h 1112 4] Output Reference : 000001a8 +[45Ch 1116 4] Flags (decoded below) : 00000001 + Single Mapping : 1