Received: by 2002:adf:e804:0:0:0:0:0 with SMTP id o4csp83009wrm; Thu, 17 Oct 2019 15:59:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHVRWdLlbgXwsy/EhnG/6PSC+6SbB61wzt6weop52SzYY4zJetfQLt5mLnC6OmgkeOjxcS X-Received: by 2002:a17:906:264f:: with SMTP id i15mr6033869ejc.333.1571353168376; Thu, 17 Oct 2019 15:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571353168; cv=none; d=google.com; s=arc-20160816; b=Y3ijNvgwazfRoEcV5woQ7ZyaG78axMfoYFkxJmSKQQSm4tutWywqEQe82M7I0Pup2e YGSE5EOAhenS8lWLVWMEZavq1yCFWKivCpPDV+4uX9YUHuZquKAQYkx+A1XWZGSRqIHy U8IP6Q9tJEC8mrZxSIm7qbfKusxMNcPxDyEMYX0MgvFzZ+G/3lURV0w6zG8TPfS43KXD xHOqRjtxGhgDDOrqD0JTNmNnE/OuxgjovaYbi34mvlW3xw10TOPKO16G5bvw/d2bPDcn WeYidjGfMXfvC+m532CeJOBkWZErss2ko/eq3HJLq20+vBqfM9loSOB27CQ2903WeXAj Q8iQ== 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=te2ggqRwm1Q8JMcpwdasQmw6R5WgKSiZ3w/ry8+z1eTtJrf9Bni3gg2hlc228AElRF Ki3TePqxZgLp0x4F5lNQcEwetnCVJlCqq8LJxBUsTvoMvCEch5KnFrhJxM+cXjPZkc6R hTTOKWtbqNVWuVeFGTMaoFNi87NAtDZ5KdgZBRRA40SdvNr/rYxpdiYhiCzTzpc9re4v XAWUpZzqjfSrWaE1vMtQfFdDYooj2n5Pfs2+/+L1gqa7exq7ifkoYY/DvrMwgj/6B9yv 0f2Juj+kwl4B2yAFQXZQ7ExgAtCF8uUxIPDhaR1h0nYfeFlfxgvvapbpggC++WcNnAHJ /xiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ROSJNBj9; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-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 a3si2505519edr.20.2019.10.17.15.59.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 15:59:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-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=ROSJNBj9; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1]:33790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLEjv-0001J8-6W for alex.bennee@linaro.org; Thu, 17 Oct 2019 18:59:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41150) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLEix-0000qk-Kh for qemu-devel@nongnu.org; Thu, 17 Oct 2019 18:58:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLEiw-0002TX-EI for qemu-devel@nongnu.org; Thu, 17 Oct 2019 18:58:27 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44655) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLEiw-0002T9-89; Thu, 17 Oct 2019 18:58:26 -0400 Received: by mail-wr1-x444.google.com with SMTP id z9so4113327wrl.11; Thu, 17 Oct 2019 15:58:26 -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=ROSJNBj9NIYbxCGEa9n1K+Z/LmM8lEn6jZDK1g2cxFCGxspV5/IGcOlSFAdkuICAuL vr6dZBsoioZvtHdlny1x291ENAxZqqiGhD2yWUvHlzbALUaoAtAK293O4bF0qGCsVqKf LCRYpNttNFhN22zeNcay6GMekvpfvct9aiyv48czYze3g+tlppxsBkd+2g0Ae0M7UI52 97ZUEhyRS11K0v095jRGFpeNCncdVlokgettfykPmNDeqGzKlxFvv04JwZ/s9kqe5OOp UmdERcIispieNDbxCImOgf9Gk9QuFQnTzLvfwUg1ySpdK6OyVCM8Yg3J5Wqt7fYGMaR5 QEMg== 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=fJVT3UU12TAK2c1EZQI3kFenUuVYDEp7vVJ96sJ9D1K7ZhC0f95/4zdQf6kHCIGMCE Y18unW54UHqjksaXb8aBJYUNmgdGq+3L39PiJxQKjY9EXiCQzA1qooydpJq1i32e1pAE geS9QYYSdoE0n/3nSmj9CGQATYkMIkq2nWtUr7gv2NZ3Hu6YdnCYdTaNtQtEl4OJLcPa 4mgCgQ1tg6D8sNBWTmms00KYh1+OE7eNvBeEBUTMR57nZbXEA/9EBsBPTGwxQ0qpymWD +5R363sD2WGRovNN7jwQ/mL5r6aHLaVx67FroVEPYVQzTXAj+njrKXUw8Pr8DVEE6EZK Bo3Q== X-Gm-Message-State: APjAAAU50J1qzUSS/A4iHwVCdrusUmDP6WqFDLD6xCiIOWq8QwT8wDsV 7Vh0SLUO6tEnAkk6y5MtCFBPSSX3 X-Received: by 2002:a5d:4808:: with SMTP id l8mr4914803wrq.118.1571353104959; Thu, 17 Oct 2019 15:58:24 -0700 (PDT) Received: from localhost.localdomain (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id m18sm3993873wrg.97.2019.10.17.15.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 15:58:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 08/10] hw/arm/raspi: Use AddressSpace when using arm_boot::write_secondary_boot Date: Fri, 18 Oct 2019 00:57:58 +0200 Message-Id: <20191017225800.6946-9-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191017225800.6946-1-f4bug@amsat.org> References: <20191017225800.6946-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::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Peter Maydell , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , Pekka Enberg , Esteban Bosse , qemu-arm@nongnu.org, Pete Batard , Cleber Rosa , Laurent Bonnans , Cheng Xiang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Clement Deschamps Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: /kEDJlQztzhJ 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