From patchwork Mon Mar 10 14:44:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25970 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 14C022055F for ; Mon, 10 Mar 2014 14:44:58 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf28293561obc.9 for ; Mon, 10 Mar 2014 07:44:57 -0700 (PDT) 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=x4jBowsjRJjG0Qx0EOEUFtXhD+6DH+3Mk9IPMZwy9bU=; b=NSaLWlSanxx4aZc+PioVPyKmr/vJ4RYwX/miYTnZ7M4k/mcyVubPoMCFyIaelSGW9q +Fm7u2N2wMQeL4DkIzxzGMQr7lBeEBqjGR9dy+M0PrXP3+xc7e86uSP2E7n+tOaOVHg7 7/hdTbNUqr0lNVtA881z+JmP5Da6qL60fDUIQDS2ctID3HA0GafZlGSX3TcrDDoYNbwA Zgj4SDLaqmidPEELhT20Hapo4SfS8gpZA5VsWjQ3zBAQNOVH54qW/tLZRC0XfnyUNyTX kmDZ0T9sYDjI6N/3cSTPZ/PVxmNvIoiBjfCd+eDkq2gHERzYtw7Wjrtokr9VVIs7m4E9 iS1g== X-Gm-Message-State: ALoCoQk3qpqGWGQlhBSRYrYUA1x2UUnPTw0dCs5FPg+4eaSCke3DL089hHHNShIcSiYihGBmWmSv X-Received: by 10.182.251.230 with SMTP id zn6mr12892100obc.14.1394462697649; Mon, 10 Mar 2014 07:44:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.169 with SMTP id o38ls2070723qge.37.gmail; Mon, 10 Mar 2014 07:44:57 -0700 (PDT) X-Received: by 10.220.178.73 with SMTP id bl9mr8890vcb.42.1394462697526; Mon, 10 Mar 2014 07:44:57 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id cl8si4756425vcb.76.2014.03.10.07.44.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 07:44:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.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.220.180; Received: by mail-vc0-f180.google.com with SMTP id lf12so1341455vcb.39 for ; Mon, 10 Mar 2014 07:44:57 -0700 (PDT) X-Received: by 10.220.200.6 with SMTP id eu6mr473537vcb.35.1394462697420; Mon, 10 Mar 2014 07:44:57 -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.78.9 with SMTP id i9csp123886vck; Mon, 10 Mar 2014 07:44:57 -0700 (PDT) X-Received: by 10.180.8.130 with SMTP id r2mr9287408wia.14.1394462696613; Mon, 10 Mar 2014 07:44:56 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ko5si18578290wjc.4.2014.03.10.07.44.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 07:44:56 -0700 (PDT) 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 1WN1Rk-0002Jk-S0; Mon, 10 Mar 2014 14:44:52 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Evgeny Voevodin , Maksim Kozlov , Igor Mitsyanko , Dmitry Solodkiy , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Rob Herring , Peter Crosthwaite Subject: [PATCH v2 3/4] exynos4210: Set reset-cbar property of Cortex-A9 CPUs Date: Mon, 10 Mar 2014 14:44:51 +0000 Message-Id: <1394462692-8871-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394462692-8871-1-git-send-email-peter.maydell@linaro.org> References: <1394462692-8871-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.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: , Set the reset-cbar property of the Exynos4210 SoC's Cortex-A9 CPUs, so that Linux doesn't misrecognize them as a broken uniprocessor SoC. Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- hw/arm/exynos4210.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index 9f137e9..6426d16 100644 --- a/hw/arm/exynos4210.c +++ b/hw/arm/exynos4210.c @@ -143,11 +143,21 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem, unsigned long mem_size; DeviceState *dev; SysBusDevice *busdev; + ObjectClass *cpu_oc; + + cpu_oc = cpu_class_by_name(TYPE_ARM_CPU, "cortex-a9"); + assert(cpu_oc); for (n = 0; n < EXYNOS4210_NCPUS; n++) { - s->cpu[n] = cpu_arm_init("cortex-a9"); - if (!s->cpu[n]) { - fprintf(stderr, "Unable to find CPU %d definition\n", n); + Object *cpuobj = object_new(object_class_get_name(cpu_oc)); + Error *err = NULL; + + s->cpu[n] = ARM_CPU(cpuobj); + object_property_set_int(cpuobj, EXYNOS4210_SMP_PRIVATE_BASE_ADDR, + "reset-cbar", &error_abort); + object_property_set_bool(cpuobj, true, "realized", &err); + if (err) { + error_report("%s", error_get_pretty(err)); exit(1); } }