From patchwork Tue May 16 07:31:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenhui Sun X-Patchwork-Id: 99847 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1892477qge; Tue, 16 May 2017 00:36:45 -0700 (PDT) X-Received: by 10.107.169.207 with SMTP id f76mr9337651ioj.71.1494920205288; Tue, 16 May 2017 00:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494920205; cv=none; d=google.com; s=arc-20160816; b=l+e1/O3O5Ihus5/rOrO9O1Xr0eEKCQj7S2MQWcwuNL5iGo5/D0y6NxaAnbg0+aKC3Z KOmkpaF14KKaw0DcMjP7w834GwQs4xAPXx4ReNOzNEL4mCfQHN1Z38tL1QlnXR2CkHTZ Tzv0evUaJ4dVAv8mm6I+CYz4C2c9QvYA1olAlXjOI3jqJvfDO5XymbYN60uPSGmra/Rs 2G/31K94ic87AbR66QMfBS0oGCtm5YpBL0pW8bXm1s/yXZI30aIbnt6uUmzKodg1xAqW E9nSKpRdE9lQny+2bqZj293e86OzcROmLlWGvY/xRkH2s+qsdlFU4Qr9EB2H/Vn1sAbL aYEQ== 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=QVi9a1O8h4qe8oQ7GHLGLvK1DlDh7IkT2IWt9Rd+rWw=; b=Poe9evT18/utcNWOSG9vHLB1bjVAgY2g+eGR/mYhErH9TYXLIF7xd3uxee97/DtbdK OP/gkkg1/tTJ6LjJTIBVDkDqAZTgqBvVi28wvZNuUoQ5XycTxg405aLgihNwZxYLRofL RHOItix6W3ZFt4442V+YI1OcfkuNSB4IV0tkJTvW6ZFly8gyqAzg/i16gDfuwQRJdmxT H086DX0JOT0AVvHyrKHX9N88nmeNNdpqUamwmmB80whrCKfPeJ6RQd7BwQMI4Gx5yppO /h7jsDpG9deEvDLNvMSH5XivybfO4SB8ESeX0N2mDcud4Q1HCZTN7qJ3ppzq9RyeUMfX WVNQ== 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 f11si12797536ioi.76.2017.05.16.00.36.44; Tue, 16 May 2017 00:36: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 08A8D60AF7; Tue, 16 May 2017 07:36: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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, 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 F32FF60866; Tue, 16 May 2017 07:36:09 +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 DEAF660866; Tue, 16 May 2017 07:36:03 +0000 (UTC) Received: from mail-pg0-f47.google.com (mail-pg0-f47.google.com [74.125.83.47]) by lists.linaro.org (Postfix) with ESMTPS id 7F9B360589 for ; Tue, 16 May 2017 07:36:01 +0000 (UTC) Received: by mail-pg0-f47.google.com with SMTP id q125so52890201pgq.2 for ; Tue, 16 May 2017 00:36:01 -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=EMaFiz2h5MJ+HRNzQjUOK9m675ZQNyK9+nBshg/j4GM=; b=Z0M3+SFT5ToB2mREYyqSOw92po+xEvrpQyb4GOQ18/Dr2IRCM2y3JKtx7qzsxY5/f5 ERfQ6LQilhKJS/yxvQvZocWoKF93trNBrjWF58lOcP1gGz1RYpMq2yKsvaxs8GF9kR2s vafkTQozumnMJ2fBbm3DaSyWeXEJTDoRT6N6G75s3KpspkPpf1osjYa/rqQutfDTLATJ N/xNc7LMqMI+Qint+Xp6tCMpuJN8/UI1FnsCs0GN4dF4Was1yj4bjJ8kuW1P3R/g5TZE n1NhkchELJ6h+VBbfLxNIl1nENjnaL4lQuzX56DuF+tUgOxj3KJ+t25UrpdcemYvKIyQ Mdnw== X-Gm-Message-State: AODbwcAPKDyoiwvdh4cIvOFuaiQbHGPjEjoBJtIIzvV4wRrFcWdwaQlB StUBmbhMMunWTfoMGEc= X-Received: by 10.98.197.133 with SMTP id j127mr10592467pfg.239.1494920160754; Tue, 16 May 2017 00:36:00 -0700 (PDT) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id n7sm4086316pfk.74.2017.05.16.00.35.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 May 2017 00:36:00 -0700 (PDT) From: Chenhui Sun To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, graeme.gregory@linaro.org Date: Tue, 16 May 2017 15:31:18 +0800 Message-Id: <1494919879-72821-2-git-send-email-chenhui.sun@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494919879-72821-1-git-send-email-chenhui.sun@linaro.org> References: <1494919879-72821-1-git-send-email-chenhui.sun@linaro.org> Cc: Yi Li , Chenhui Sun , "zhichang.yuan" , Heyi Guo , sunchenhui@huawei.com, wanghuiqiang@huawei.com Subject: [Linaro-uefi] [PATCH 2/3] D03: Support ipmi through LPC 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: "zhichang.yuan" Add ipmi description according to the new LPC driver of Linux kernel 4.10 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zhichang.yuan Signed-off-by: Heyi Guo Signed-off-by: Yi Li Signed-off-by: Chenhui Sun Reviewed-by: Graeme Gregory --- .../Hisilicon/Hi1610/Hi1610AcpiTables/Dsdt/Lpc.asl | 91 ++++++++++++++++++++-- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/Chips/Hisilicon/Hi1610/Hi1610AcpiTables/Dsdt/Lpc.asl b/Chips/Hisilicon/Hi1610/Hi1610AcpiTables/Dsdt/Lpc.asl index 0965afc..d4b2372 100644 --- a/Chips/Hisilicon/Hi1610/Hi1610AcpiTables/Dsdt/Lpc.asl +++ b/Chips/Hisilicon/Hi1610/Hi1610AcpiTables/Dsdt/Lpc.asl @@ -16,10 +16,89 @@ // LPC // -Device (LPC0) -{ - Name(_HID, "HISI0191") // HiSi LPC - Name (_CRS, ResourceTemplate () { - Memory32Fixed (ReadWrite, 0xa01b0000, 0x1000) - }) +Scope(_SB) { + Device (LPC0) { + Name (_HID, "HISI0191") // HiSi LPC + Name (_CRS, ResourceTemplate () { + Memory32Fixed (ReadWrite, 0xa01b0000, 0x1000) + }) + } + + Device (LPC0.IPMI) { + Name (_HID, "IPI0001") + Method (_IFT) { + Return (0x03) + } + Name (LORS, ResourceTemplate() { + QWordIO ( + ResourceConsumer, + MinNotFixed, // _MIF + MaxNotFixed, // _MAF + PosDecode, + EntireRange, + 0x0, // _GRA + 0xe4, // _MIN + 0x3fff, // _MAX + 0x0, // _TRA + 0x04, // _LEN + , , + BTIO + ) + }) + CreateQWordField (LORS, BTIO._MIN, CMIN) + CreateQWordField (LORS, BTIO._MAX, CMAX) + CreateQWordField (LORS, BTIO._LEN, CLEN) + + Method (_PRS, 0) { + Return (LORS) + } + + Method (_CRS, 0) { + Return (LORS) + } + Method (_SRS, 1) { + CreateQWordField (Arg0, \_SB.LPC0.IPMI.BTIO._MIN, IMIN) + Store (IMIN, CMIN) + CreateQWordField (Arg0, \_SB.LPC0.IPMI.BTIO._MAX, IMAX) + Store (IMAX, CMAX) + } + } + + Device (LPC0.CON0) { + Name (_HID, "HISI1031") + Name (_CID, "PNP0501") + Name (LORS, ResourceTemplate() { + QWordIO ( + ResourceConsumer, + MinNotFixed, // _MIF + MaxNotFixed, // _MAF + PosDecode, + EntireRange, + 0x0, // _GRA + 0x2F8, // _MIN + 0x3fff, // _MAX + 0x0, // _TRA + 0x08, // _LEN + , , + IO02 + ) + }) + CreateQWordField (LORS, IO02._MIN, CMIN) + CreateQWordField (LORS, IO02._MAX, CMAX) + CreateQWordField (LORS, IO02._LEN, CLEN) + + Method (_PRS, 0) { + Return (LORS) + } + + Method (_CRS, 0) { + Return (LORS) + } + Method (_SRS, 1) { + CreateQWordField (Arg0, \_SB.LPC0.CON0.IO02._MIN, IMIN) + Store (IMIN, CMIN) + CreateQWordField (Arg0, \_SB.LPC0.CON0.IO02._MAX, IMAX) + Store (IMAX, CMAX) + } + } }