Received: by 2002:adf:e804:0:0:0:0:0 with SMTP id o4csp2722529wrm; Sat, 19 Oct 2019 16:56:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUdWyZ0vtLtfD6lMW+EhG3aLQevAEq9ifwm66kF1QcyGDBtJ82drX4h+EB/fFaXzOBI9EB X-Received: by 2002:a37:a614:: with SMTP id p20mr2440451qke.352.1571529392110; Sat, 19 Oct 2019 16:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571529392; cv=none; d=google.com; s=arc-20160816; b=iFR0344wbeHRNQ/S2/6OAvDDbiuMQo092/jN5t3/2wlL6hPg6QWEtDrJSv/lIkpO74 Rlls1lcZujjJJwhh1TFmOmal9iUZG73lxnr9Fz/3s0ALOwzx/VDaYClEiQvOT+OB68Rg B+YrzDF3apE0q/jnr+nDKS/LN+jqaNAnfxvaBDH46U+RlypI+xF9u0O/3YuXg7Bwa8TB x8KRZmP3fQRC413XkzEuDnHVJ9DA93cklwuy3r6xWy8ciZvfbAQ31s8PQvPKlqOX7MX+ Qfrr0+VjoI9OzvHYAJ8ibiPRLQd2SQofx16E6KHo1T51Wv5WvVyQkjaq+tK6Yyc5KhSF ljEQ== 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=t7hE2pbrub3AVEyc/oyjS4UfKKd4rj51NgMEOKFwXuo=; b=Yf47CR0f88bgUK+ZPqtWDPWvPUG+dJc7FuAaiZRrs3PwHRAbpstxlYLenWOiKH3YWo JsoQmoLT1L/IiQTF7wn5l8vwymdrQPvLPmoxI74cowoAIJACXRH2fPOR9Qjk1fHZ50eD 4KdSs3erUTxkSPTMWxJp7fqncoE8EJoumYLCjOJNzteBM84cRwK8vYzNr15eK6wU96Fj s1AJDOwVzYHWrop+0adQZTcEKOxxgoBAO8e1M/Yd6BRHc4aReEK+h8KtIcwj23jw2uNI sSzgNFsaltzTBkyJ5a+4nn3XIKdKjhffNahsUvhoDFknDcQtr1LK3NidaCUdICA7Uy4L QkFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BFiqlYfH; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o20si7503582qtk.86.2019.10.19.16.56.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Oct 2019 16:56:32 -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=BFiqlYfH; 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" Received: from localhost ([::1]:42224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLyaF-0004Hc-2v for alex.bennee@linaro.org; Sat, 19 Oct 2019 19:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34653) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLyRg-0000Qq-Bx for qemu-arm@nongnu.org; Sat, 19 Oct 2019 19:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLyRf-0005eb-6f for qemu-arm@nongnu.org; Sat, 19 Oct 2019 19:47:40 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:39022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLyRc-0005cR-LS; Sat, 19 Oct 2019 19:47:36 -0400 Received: by mail-wm1-x344.google.com with SMTP id v17so9293640wml.4; Sat, 19 Oct 2019 16:47:36 -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=t7hE2pbrub3AVEyc/oyjS4UfKKd4rj51NgMEOKFwXuo=; b=BFiqlYfHurAD4oF18R9w4sddxFJxMhYyTp07v52acGbmFLL6ijI/6Qxnuf6WJ6eYXh xvIaYeou6w2D87k7Bn8lAG/i2pzPQ9NaSyIahJB8nR3OT2xujB4hWoQjoqwtzVg4TqgB 9tDeY/fj7y+byjBTPsnZyS992eUUJ9VfDktMXN6wy7jmsj8AvqGoJoKdBtC3OaBg+8Jk aBhgZp57FTLnjD8nI+lYD+7jRePVrXMGS8j3ElSAmqLWrb1CEzP+cwDCry8hlK4EMyHl Fpvfg+J4Zfq+Z6fKcQai4qlPK6r/sNMFkFUKed2lUCYFQJ63WeGzJegOZG8fT/1eWxoD OgtA== 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=t7hE2pbrub3AVEyc/oyjS4UfKKd4rj51NgMEOKFwXuo=; b=hjZmr4QRIh0YEuLlzlz077I4lXo1Y7OCblWEhGdt8lPQ9RsZrS8muZw545i8slcaaZ WasCJL/jJWW0S/B6tqsLc1orLWKW2RMLiJrGLqS/Ez7rxDEguDEzFRRB4SralKFeoBXr Un25aLQWMj1WtwwXdL8tdwb2BZeTxM/vcTqa5cZuh4gTJOHbG+dYI7bG+kYnH0C1ojjc jbWZjeg95JBVvqPOljxkcZQueVaQx5AsqsvceJP5mjsPV9GVxx7xXjQ8IabXcDqDJQwf JvJBJqZ/7/7NCQ/nBgZbfRyvk2sPoUtDv9lr2BtUeIBrvsFs9OimBmKzDFXLRV8yQXs9 9Mkg== X-Gm-Message-State: APjAAAVT0jYWjwV0YtOYZXlKw+7W2WZejM4iDyjirFABKBkbqVNBYcCS NMnixOQeD4WU2PK7sAvpPXa2m0OF X-Received: by 2002:a1c:658a:: with SMTP id z132mr12769528wmb.174.1571528855548; Sat, 19 Oct 2019 16:47:35 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id u1sm10433763wrp.56.2019.10.19.16.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 16:47:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 10/16] hw/arm/raspi: Use AddressSpace when using arm_boot::write_secondary_boot Date: Sun, 20 Oct 2019 01:47:09 +0200 Message-Id: <20191019234715.25750-11-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019234715.25750-1-f4bug@amsat.org> References: <20191019234715.25750-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 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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 , Matthias Brugger , Rob Herring , Alistair Francis , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , Esteban Bosse , "Emilio G . Cota" , Clement Deschamps , qemu-arm@nongnu.org, Cleber Rosa , Laurent Bonnans , Cheng Xiang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pekka Enberg , Pete Batard Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: deeQRaIcJYAW write_secondary_boot() is used in SMP configurations where the CPU address space might not be the main System Bus. The rom_add_blob_fixed_as() function allow us to specify an address space. Use it to write each boot blob in the corresponding CPU address space. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/raspi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index a12459bc41..569d85c11a 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -60,12 +60,14 @@ static void write_smpboot(ARMCPU *cpu, const struct arm_boot_info *info) QEMU_BUILD_BUG_ON((BOARDSETUP_ADDR & 0xf) != 0 || (BOARDSETUP_ADDR >> 4) >= 0x100); - rom_add_blob_fixed("raspi_smpboot", smpboot, sizeof(smpboot), - info->smp_loader_start); + rom_add_blob_fixed_as("raspi_smpboot", smpboot, sizeof(smpboot), + info->smp_loader_start, + arm_boot_address_space(cpu, info)); } static void write_smpboot64(ARMCPU *cpu, const struct arm_boot_info *info) { + AddressSpace *as = arm_boot_address_space(cpu, info); /* Unlike the AArch32 version we don't need to call the board setup hook. * The mechanism for doing the spin-table is also entirely different. * We must have four 64-bit fields at absolute addresses @@ -92,10 +94,10 @@ static void write_smpboot64(ARMCPU *cpu, const struct arm_boot_info *info) 0, 0, 0, 0 }; - rom_add_blob_fixed("raspi_smpboot", smpboot, sizeof(smpboot), - info->smp_loader_start); - rom_add_blob_fixed("raspi_spintables", spintables, sizeof(spintables), - SPINTABLE_ADDR); + rom_add_blob_fixed_as("raspi_smpboot", smpboot, sizeof(smpboot), + info->smp_loader_start, as); + rom_add_blob_fixed_as("raspi_spintables", spintables, sizeof(spintables), + SPINTABLE_ADDR, as); } static void write_board_setup(ARMCPU *cpu, const struct arm_boot_info *info) -- 2.21.0