From patchwork Tue May 16 07:36:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenhui Sun X-Patchwork-Id: 99849 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1893547qge; Tue, 16 May 2017 00:40:50 -0700 (PDT) X-Received: by 10.55.217.146 with SMTP id q18mr8726361qkl.249.1494920449954; Tue, 16 May 2017 00:40:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494920449; cv=none; d=google.com; s=arc-20160816; b=A5OwBAYGd8zxSEDEl+8LatmO5MuU9LT/UnNz1n3kfSHSiq/2dwGbxzF0DoFVbtiu4v 1WF+3S3zyqReuLOBU00aHAnPQXiLL9qWiWUob7fOBAEUz5t8tcoztUyc8jT46coMZsaa lJfw7qyf/ukuOPtVU1SPNX6pZqAO8n3DD3f777iNSs0wLAQK1GcKZP0HMKWE5O3GPFjd lmeXpbUx6vfPS7CozayMFHUaesCx7OdzJFBs7iLfyJNIiWRPf3qxbcLuX26tdFshzBek qGa6JrL+xWU+pnijPfYphPkHvgMv5Pmx8ci3Uzd7McFvo7WwHXx8a7iOZ7QWfyTTTGAr z0yg== 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:message-id:date:to:from:delivered-to :arc-authentication-results; bh=QIwEzueQ//vn2x3/KXgXtazPHZVlkRLG7j9bdI76eto=; b=gdyaFeBLSJd9AWqCNrl0GM53UP3RUG3AuvKs20LDqBO4Z9mTQHijHQAi5DN6r5hV+J M3H6VHBFQQbdASaNWWnwwbOyoohNEpi29ooBNVnDd5sCCKEzWESXoX30RLLYpt4WFTQO e5lQi3bWkrWAx3r6FZ+kc6DLN2OPar23we/AjPzWWnOdT5FCP/nGfL4DD1ch6K3sR5zb gARUIOZyfxkw41FmLjRUP9zXeSRT5l2D6UzxT2rxUzYpm8lDEkWLktCKJ9bpXGOYim8C 9B9k70hP0z5V8JH3m4gs8OH73XU8ph2HPGruPGag/MZAK1ZSNUNLW7jPOpdXrQSZTROs 7iUw== 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 h187si6295391qkc.171.2017.05.16.00.40.49; Tue, 16 May 2017 00:40:49 -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 769A16074A; Tue, 16 May 2017 07:40:49 +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 F0ADD60665; Tue, 16 May 2017 07:40:44 +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 E37CA6068E; Tue, 16 May 2017 07:40:42 +0000 (UTC) Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by lists.linaro.org (Postfix) with ESMTPS id 9D26C60589 for ; Tue, 16 May 2017 07:40:41 +0000 (UTC) Received: by mail-pf0-f174.google.com with SMTP id n23so71073951pfb.2 for ; Tue, 16 May 2017 00:40:41 -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; bh=iF3keIwgh65k3EGqwC3J3TZcCxhjJkYoE0BifKHmVq8=; b=iToyKFSGvPh929x65TYABhYwDOGzcfv+MWRtBqqCdtruiElScqdmL0UGQH4i7X6PH7 Mi46JEAJKCiRtjmBsYYA+M3m63ghL4/uQPEnz3IC2LRiVVQQO5XQxiWHFKxapE0ReGz9 aCAsG5Sg05UT5IwU35iSvTc/uD6938JOcEkY582U0i9CljdR7v2xhH1xSESKsTDLSFzv 2UgEdP9V1wpgylswWEWOG/mvQwoctuOoBYAN2+OyFHCT1KgOoTUqpYxMYKo63uWqnxCK 3fjncnmlVGmzS77AMZNefTNb17KirRGGNYBASgYJtNULDYFZNlaskN+nB0uYz7cVNYnu bH6w== X-Gm-Message-State: AODbwcCO16Ppe8vPkEBwz8UvB6Du8jd1Uy0dJIg2A6VDTpyKF+KABre5 FSlNLNzfu5U+PMNVWSQ= X-Received: by 10.98.93.20 with SMTP id r20mr10741149pfb.151.1494920440819; Tue, 16 May 2017 00:40:40 -0700 (PDT) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id p13sm25106657pfl.52.2017.05.16.00.40.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 May 2017 00:40:40 -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:36:14 +0800 Message-Id: <1494920174-72966-1-git-send-email-chenhui.sun@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: Yi Li , zhichang yuan , wanghuiqiang@huawei.com, Heyi Guo , sunchenhui@huawei.com, Chenhui Sun Subject: [Linaro-uefi] [PATCH 3/3] D05: 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: Chenhui Sun 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 --- Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl | 91 +++++++++++++++++++++-- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl index 0965afc..d4b2372 100644 --- a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl +++ b/Chips/Hisilicon/Hi1616/D05AcpiTables/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) + } + } }