Received: by 2002:ac2:4c26:0:0:0:0:0 with SMTP id u6csp168508lfq; Thu, 24 Sep 2020 04:23:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLkSTE9ckgJAAmTyYErP2uAFQ+WgLpLB+kcpE0oa2leBL8Ynesk1jH4qsuR602rtCu2/Iz X-Received: by 2002:a25:eb08:: with SMTP id d8mr5481012ybs.460.1600946629022; Thu, 24 Sep 2020 04:23:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600946629; cv=none; d=google.com; s=arc-20160816; b=Q71CeKS7YBol++ZHayNlGbLh6OzQdK/by9eM47uNH/Ow5LXEMaZZbgHD9JgeEwjWLj AsEtS2Dzuuj97/HSa3CoTvfk3HIQndbqyzTYwaxVPXzhpbN6G4z6SwfGth6dhnHNBxS5 rQcEgmAwVl9rJN0r5DxzQlxOOuaEk0hF21B/uIBJgnb6EsPpTAITOtCimV3vYn+xI1mr sCIvTO9whHdWqExL+906w1yEJzBllTALuYxMNd6CYgdjLJhC90C7RNkct75I2ov5Fzhb w30vUZcrmuAZDSr9LDgwDZv+w9QDb+SrTJZ1zD+/xl1Lbxnrqy+Xm8ELcHF4tkv+aM0/ 5LUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jy59s2K9kYiBxlA0hJextDJqNNjzNOlqp0zEmQTHIzI=; b=q9HM3gS81/22ApOjHhpSltOq1940zgwkKanHIGKKZ4B7NTj1trr1QIsN5pGnaBk3sZ Q8kJSEEU0/VWX0m/HoH2E/YuDXE/O6e0zqTmwxv2LVV26hL9+RWGqgAw21GcbdCPr+ix 9vBkQV/NthqBBJv56YYAJSRBazCr956wod2DAkAiJjC13X4hoyM9iOrfx9H9Qyu2cNci DGCSKmlPE0QHOxjyNGEc52GHIZ61p09atYDqhh6RHD+miovOg97iYA9ZgKay1ltTWyTn 5MrSWokP/hMO/Z3iumuKxwfO+8vjK34QRy3tFiirkbaI2lXuyvyesBrcmrklRviU7nPq amZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Qsk1Esf9; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 126si2719501ybp.66.2020.09.24.04.23.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Sep 2020 04:23:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Qsk1Esf9; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Received: from localhost ([::1]:43124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLPLo-0003xV-Cj for alex.bennee@linaro.org; Thu, 24 Sep 2020 07:23:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLPGY-0004Ps-Gl; Thu, 24 Sep 2020 07:18:22 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:44631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLPGX-0003w5-0l; Thu, 24 Sep 2020 07:18:22 -0400 Received: by mail-wr1-x441.google.com with SMTP id s12so3333962wrw.11; Thu, 24 Sep 2020 04:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jy59s2K9kYiBxlA0hJextDJqNNjzNOlqp0zEmQTHIzI=; b=Qsk1Esf95NymoPBfYMmfEKzU7xIIx35y4/E2mkp26+k6533cKzCFMjp4dY1kAX5597 lf/tcKryKPtVezN1cK8QMWRWvgBUAHWpxXycifdCCXbq3UAllL7AjtFIs4dpZPevx7Sh +Oe1/trLIN6A9I3XZxW0zxnPgoKq0D3uM3yrUbF/XE4O1Z24ychNiKDpEC3qVglFS+f7 ypAxavSq+CvcF/u3wAPXk1gepKehS1qaz35IPCrG8ICLXwHnVG8OiaTGqIYeY1pGnuDb 4k2SJNHAfUXg9YPhr5mCGPMlF//VzujLmOZ1eixa1fhP61XJpeMhF0V/GG5xFwrk1Y/1 6zVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jy59s2K9kYiBxlA0hJextDJqNNjzNOlqp0zEmQTHIzI=; b=nCy1UZhv0I8PbFgttAw9X/H3EG34gC8MfwOiaCGNVasIcenJW+WuTmOISAYpf+pPCg vJKiTjt1DhNHNHwSvPjypyRAkVZm4YGiuN/LVXFGybdHuYWLuhCxJnJOHU3FuBcLs30/ 8kBxG/ggHYOYzBPSMltP+9srSoeNZ0kCnAkiRdGa+ge8TtN/gziMX+6vfItkEtojudR3 PPEIFTkWvfwypYEeoAMTHU2l92NUS4f0a/7f1eJLxEtTCo8ZKc981XZi0xJV9t1tC5BB 21SiMqIg+xPAb7e4+hZHHY66znMQ7DSjTZ3QpHhV6J6er8J6xXHtm9rY7uYYYH9wySq2 8ZsQ== X-Gm-Message-State: AOAM533FLULscSo4DcEOl/qsI56OvK2J5/uNpbrRvjFAXA6RnHuHNE+B FEHRRIn2xlow7/+mzQGYqfCmwEvKdyI= X-Received: by 2002:a05:6000:1c8:: with SMTP id t8mr4472553wrx.3.1600946299022; Thu, 24 Sep 2020 04:18:19 -0700 (PDT) Received: from x1w.redhat.com (234.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.234]) by smtp.gmail.com with ESMTPSA id h76sm3400363wme.10.2020.09.24.04.18.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 04:18:18 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v4 7/8] hw/arm/raspi: Use RaspiProcessorId to set the firmware load address Date: Thu, 24 Sep 2020 13:18:07 +0200 Message-Id: <20200924111808.77168-8-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200924111808.77168-1-f4bug@amsat.org> References: <20200924111808.77168-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, Luc Michel , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: miNxrpg9yFCv The firmware load address depends on the SoC ("processor id") used, not on the version of the board. Suggested-by: Luc Michel Reviewed-by: Luc Michel Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/raspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 0d8e5a34c78..ae98a2fbfca 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -238,7 +238,8 @@ static void setup_boot(MachineState *machine, int version, size_t ram_size) * the normal Linux boot process */ if (machine->firmware) { - hwaddr firmware_addr = version == 3 ? FIRMWARE_ADDR_3 : FIRMWARE_ADDR_2; + hwaddr firmware_addr = processor_id <= PROCESSOR_ID_BCM2836 + ? FIRMWARE_ADDR_2 : FIRMWARE_ADDR_3; /* load the firmware image (typically kernel.img) */ r = load_image_targphys(machine->firmware, firmware_addr, ram_size - firmware_addr); -- 2.26.2