From patchwork Mon Feb 24 20:24:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25212 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E855B2066E for ; Mon, 24 Feb 2014 20:24:11 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id v10sf18456270pde.5 for ; Mon, 24 Feb 2014 12:24:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=u1hWlFotR+FUo8Y3Ep2zvuwr+i2K/9FoZ6FMp3WohNQ=; b=Z7Kg3JBqbuFou+sMSB10kM5nuYutcUTBmIPZChIv39mPbTnWOK3ZhF213SGvrxGtY3 oshzRl6hDYZLIKUI5Rur4cTHOBPxC78bH6kany1g/kqpg0HIzwiwgKUMammA8N3N1sg/ Qz87MYAyt0l0H0e9Y6niu/5vvnyM/Wp2VuDJkbTCf83tgsZV5gkd7jR8hGJ/N5kD+Iwb QGX6wV+u3kI1BMyWBKOl0d4NyCEMh2dXSu8unI3gTWvlNqpxw3SPTPnh48DCLhRsbBHc CK2UpX6RVtLbeqc6jU3FySwIVb9VasVJAfihf1PP66fib3R3P6d8wLZHCQyucSHitOfW On7g== X-Gm-Message-State: ALoCoQmnL5rKqU6NOEeezYRhqFv2J1d8OxclCscvzcIJyjpdvBQBbhp279tyfKvzUUPYSE6UW81w X-Received: by 10.66.150.106 with SMTP id uh10mr11574371pab.13.1393273451180; Mon, 24 Feb 2014 12:24:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.72 with SMTP id e66ls2087827qge.67.gmail; Mon, 24 Feb 2014 12:24:11 -0800 (PST) X-Received: by 10.221.2.138 with SMTP id nu10mr1673888vcb.52.1393273451037; Mon, 24 Feb 2014 12:24:11 -0800 (PST) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id xs6si6175102vec.116.2014.02.24.12.24.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 12:24:11 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if11so6163043vcb.22 for ; Mon, 24 Feb 2014 12:24:11 -0800 (PST) X-Received: by 10.52.95.233 with SMTP id dn9mr11639497vdb.3.1393273450903; Mon, 24 Feb 2014 12:24:10 -0800 (PST) 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 u4csp86895vcz; Mon, 24 Feb 2014 12:24:10 -0800 (PST) X-Received: by 10.180.149.206 with SMTP id uc14mr16166363wib.44.1393273447425; Mon, 24 Feb 2014 12:24:07 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id cs3si16311411wjc.60.2014.02.24.12.24.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 24 Feb 2014 12:24:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WI24I-0005PB-7X; Mon, 24 Feb 2014 20:24:02 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexey Kardashevskiy , Evgeny Voevodin , Maksim Kozlov , Igor Mitsyanko , Dmitry Solodkiy , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Rob Herring , Peter Crosthwaite Subject: [PATCH 4/4] virt: Set reset-cbar on CPUs Date: Mon, 24 Feb 2014 20:24:02 +0000 Message-Id: <1393273442-20736-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393273442-20736-1-git-send-email-peter.maydell@linaro.org> References: <1393273442-20736-1-git-send-email-peter.maydell@linaro.org> 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.220.177 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: , Set the reset-cbar property on CPUs used by the virt board, if they have it. This isn't necessary for correct functioning under Linux (since the A9 isn't a valid CPU for the virt board), but it is the correct behaviour. Signed-off-by: Peter Maydell --- hw/arm/virt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 517f2fe..b418b77 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -379,6 +379,7 @@ static void machvirt_init(QEMUMachineInitArgs *args) for (n = 0; n < smp_cpus; n++) { ObjectClass *oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model); Object *cpuobj; + Error *err = NULL; if (!oc) { fprintf(stderr, "Unable to find CPU definition\n"); @@ -390,6 +391,16 @@ static void machvirt_init(QEMUMachineInitArgs *args) if (n > 0) { object_property_set_bool(cpuobj, true, "start-powered-off", NULL); } + + if (object_property_find(cpuobj, "reset-cbar", NULL)) { + object_property_set_int(cpuobj, vbi->memmap[VIRT_CPUPERIPHS].base, + "reset-cbar", &err); + if (err) { + error_report("%s", error_get_pretty(err)); + exit(1); + } + } + object_property_set_bool(cpuobj, true, "realized", NULL); } fdt_add_cpu_nodes(vbi);