From patchwork Thu Sep 5 16:43:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 19780 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 666D824692 for ; Thu, 5 Sep 2013 16:44:00 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf2225108vcb.5 for ; Thu, 05 Sep 2013 09:44:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:sender:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=IDt75Jfv76ZnjDOr3sEm2Gvs+Gu/K8y6I1y7FUtP+lU=; b=BqEemXkz1XTJHdHHUnWjimQeh64p0X0YMjQAuJafThFPs5Ptvi0yncsXiQiE+G7P6g O4ov4ninpdvxfj2wYw9LexHMkDF7lumHnMICv66AkM8Zjq57gGZOET+vfw152mkd/pdV 5LTj8UFGmWFT9fpu4FlKNrsRmoQiNUBEEJoeeZ7Jw2B/OSswaxBG1yQV+Fo4DnxrHMUN 9CgU9N6jwLj+kH+3Jo7c/sFjsfeHzedoTBq/37IhF1Wnd6ofW7PhLkW9ysZEk0AfaEXC 1BCmPDQG3jbfrIp8dsEDWizU8NM64lGWwsTe/nSQAu5x17d7xNRX5WdrPcrL1n0SDs2f AYcA== X-Received: by 10.236.52.228 with SMTP id e64mr3254791yhc.45.1378399439969; Thu, 05 Sep 2013 09:43:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.127.99 with SMTP id nf3ls615234qeb.83.gmail; Thu, 05 Sep 2013 09:43:59 -0700 (PDT) X-Received: by 10.58.235.193 with SMTP id uo1mr8589766vec.6.1378399439881; Thu, 05 Sep 2013 09:43:59 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id dc9si1545933vec.11.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Sep 2013 09:43:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so732861veb.11 for ; Thu, 05 Sep 2013 09:43:59 -0700 (PDT) X-Gm-Message-State: ALoCoQlJ5Ug08mxP9BT+T5k6/ercOU5355BMpc2LyvWx0SmGuiGdSCNm70bKB2PLBVOyz0pgP53x X-Received: by 10.52.119.228 with SMTP id kx4mr3347241vdb.12.1378399439725; Thu, 05 Sep 2013 09:43:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp290376vcz; Thu, 5 Sep 2013 09:43:59 -0700 (PDT) X-Received: by 10.194.176.163 with SMTP id cj3mr7684041wjc.8.1378399438788; Thu, 05 Sep 2013 09:43:58 -0700 (PDT) Received: from chiark.greenend.org.uk (v6.chiark.greenend.org.uk. [2001:ba8:1e3::]) by mx.google.com with ESMTPS id vt5si11506538wjc.113.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Sep 2013 09:43:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pmaydell@chiark.greenend.org.uk designates 2001:ba8:1e3:: as permitted sender) client-ip=2001:ba8:1e3::; Received: by chiark.greenend.org.uk (Debian Exim 4.72 #1) with local (return-path pmaydell@chiark.greenend.org.uk) id 1VHcez-0004aW-Qe; Thu, 05 Sep 2013 17:43:57 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH] pl110: Clarify comment about PL110 ID on VersatilePB Date: Thu, 5 Sep 2013 17:43:57 +0100 Message-Id: <1378399437-17615-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Sender: Peter Maydell X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Clarify a comment about the ID register value presented by the PL110 variant present on the VersatilePB board (based on testing what the actual hardware does), to indicate that this is not an error in our emulation, and to remove an #if-0. Signed-off-by: Peter Maydell --- I happened to have to check the h/w behaviour in this area today during a discussion about some kernel pl11x patches, so I thought I might as well record the info and clean up the #if-0 in the process. hw/display/pl110.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/display/pl110.c b/hw/display/pl110.c index e79ab4b..790e510 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -94,23 +94,21 @@ static const VMStateDescription vmstate_pl110 = { static const unsigned char pl110_id[] = { 0x10, 0x11, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1 }; -/* The Arm documentation (DDI0224C) says the CLDC on the Versatile board - has a different ID. However Linux only looks for the normal ID. */ -#if 0 -static const unsigned char pl110_versatile_id[] = -{ 0x93, 0x10, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1 }; -#else -#define pl110_versatile_id pl110_id -#endif - static const unsigned char pl111_id[] = { 0x11, 0x11, 0x24, 0x00, 0x0d, 0xf0, 0x05, 0xb1 }; + /* Indexed by pl110_version */ static const unsigned char *idregs[] = { pl110_id, - pl110_versatile_id, + /* The ARM documentation (DDI0224C) says the CLCDC on the Versatile board + * has a different ID (0x93, 0x10, 0x04, 0x00, ...). However the hardware + * itself has the same ID values as a stock PL110, and guests (in + * particular Linux) rely on this. We emulate what the hardware does, + * rather than what the docs claim it ought to do. + */ + pl110_id, pl111_id };