From patchwork Wed May 8 17:45:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 795499 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:34e:ceec:bfcd with SMTP id k28csp903892wrc; Wed, 8 May 2024 10:48:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVBgLNw6R0BmR527tP56wYwRXRuoH6waqiFR2HxFd0giqkDexA7ZD1FCOfbR//OI5LSIyNcGIB/nQOdGZ71myK2 X-Google-Smtp-Source: AGHT+IG9L3uRABLa3vnBn8mrczsPYBxiH1CNRz1e9mP/DhPbkR3ttw9o+14z7GwnQxcnVo5f6Yec X-Received: by 2002:a05:622a:38d:b0:43a:e730:3a23 with SMTP id d75a77b69052e-43dbec04f54mr36080511cf.3.1715190521970; Wed, 08 May 2024 10:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715190521; cv=none; d=google.com; s=arc-20160816; b=sP5qcENU6zni6ulkmIvBGiC7cMpEzShz/qD3VxIVtlvlh9ZLCPAEFwcyReJfvwalvs S24Y4t0U6pu3kNAaTdahCdjnxB68pknkVCmigD64jfLuYF36b3J3iwsS0bBs+r4baLjh DL8A+o1Yqqgl4BkEY2W++md6coLrKDukRKZeQMcRGW/9zVEVJxpUB0firbodLJREoRs9 5xoCn/ZFSuuj4CjvS3PKwA8iP5lmtZd6EhdGNCspLBpIDIGnSeibBFPbnKl5aWLSkCRS zL1qCuqEThmw4lQQhj/BkDqIpQ0dA9t75or9Givv59/FnYz+npxMTW24kkdVe8fibhcO U5xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=4ksHT3bB/Mu2+/CUZFpNJqWT39TDBSsmRF88s5MP6rA=; fh=fz3DJMUXEzejNv0JWYQ+xa02BmrDN+/I7HIv5ot61VY=; b=aO3aNLdglu7liClxodvk0vlDz3lWcnXnyU9gxyazT47CZULK/ZupA21J7d30o04wIl MhQID6uF5YqaGZTBG0+dO0qyNoKS+mpycl4YLkMPl8XC/ZX2FHY050uVCDaYampA+E1H kqw8M/BqQOkBYNJ3K3kFF1HDgVwjndBK8jIxLjCXRDTIWLCpofXhF/opwHE7Yyuuz5Zd doJgTClFR2ppUzlIA77t0oJufWTu8zp8FI+bXShRXSciiF3erUpL8NlrHYFJUx2/MCCM 6fwiaJGHqpMyDgyFUc+HBDTu7RO+k8l1o2gBmFpMPx1oXF8AdPHz2Sk0jRh9Gry0C9BV nSxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O4Z48j9A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v13-20020a05622a144d00b0043de754a0d0si617276qtx.507.2024.05.08.10.48.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2024 10:48:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O4Z48j9A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4lNb-0002jz-My; Wed, 08 May 2024 13:46:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4lNX-0002Nm-Qc for qemu-devel@nongnu.org; Wed, 08 May 2024 13:46:56 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4lNV-0008NS-A3 for qemu-devel@nongnu.org; Wed, 08 May 2024 13:46:55 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-51f60817e34so5567041e87.2 for ; Wed, 08 May 2024 10:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715190411; x=1715795211; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4ksHT3bB/Mu2+/CUZFpNJqWT39TDBSsmRF88s5MP6rA=; b=O4Z48j9AVvCjFHDzDesqLZHTJsINN2l31GJkU9xbkek91JkL3+P7Tqc5oZnSurOgv0 I7ti91Ge+zxbr31k65ZGuIYEQoNGd6CwWd9l3S/PWo57i8f1VASDQkLUbEfSe9Ngnk6d XMPMb7s9K9NgPgebnGd+u4w6yANQaj3bOzvNHEfp5CbnAmnc7IhqyI5LYIvNGfu9Y+ZK N2RvNObdTcQy2ayr8M/wYwN3yFVql/XxNzXjH+PUdB7NAvi18dIbtJYCnZo1ffEgRONH 19wDz7cAqa1joKYHwxOBTOQmRiocGWS3NqH5oI9teetHgZrJ7SUKzji7PUaOBkcNAEbO 058g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715190411; x=1715795211; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4ksHT3bB/Mu2+/CUZFpNJqWT39TDBSsmRF88s5MP6rA=; b=i3Hu1tBO1+O3UoCAWziqvia+gG3bUoFI7GXQD2+tzai+eLBIGDUXp5zlPr+rKmWHBU 3GD8R37pzVC6BcKDoDDgiay+Bijw6Z80AEr0fv3wg1i6vFkiAO5tEVsCTeFlvEKGChgu rPepF70xy9dLKthaHOdlvJJwsmvLp40tUPl20jhyBjGlVQRfRzyd/ri0Cue4wUNea9Iu 2YTEQqYVzwSbt/0cvAxjeHiWcBOOUNdNyyxRcG4VQZ7igMy9ewpU517GCeRy8wwCGNpg nay6Y+Acni5RzkgrUwi4cEwyCB2sRVy+GSbND9UBFteYpxZ3Fl2wepaW2qPE5vHVp5SH IXVQ== X-Gm-Message-State: AOJu0YwFPY7kEpYtBCefKbrKPJlFKMj80pigBEyPLR6BgUG2hUky8nQs WT6n0C9MJ7pnIWmrLJ5rhP3TFK9WV2Z9AKxoE5cNx04Na6aWHlOvLpuEurLt1NFnVCn2MVlO5Pu + X-Received: by 2002:a05:6512:3b92:b0:51e:f68b:d266 with SMTP id 2adb3069b0e04-5217cc42a62mr2596591e87.50.1715190410789; Wed, 08 May 2024 10:46:50 -0700 (PDT) Received: from m1x-phil.lan (sar95-h02-176-184-10-250.dsl.sta.abo.bbox.fr. [176.184.10.250]) by smtp.gmail.com with ESMTPSA id q8-20020a170906a08800b00a59ce3ec763sm3925589ejy.154.2024.05.08.10.46.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 May 2024 10:46:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PULL 18/26] hw/loongarch: move memory map to boot.c Date: Wed, 8 May 2024 19:45:02 +0200 Message-ID: <20240508174510.60470-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508174510.60470-1-philmd@linaro.org> References: <20240508174510.60470-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Paolo Bonzini Ensure that it can be used even if virt.c is not included in the build, as is the case for --without-default-devices. Signed-off-by: Paolo Bonzini Acked-by: Richard Henderson Message-ID: <20240507145135.270803-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/loongarch/boot.h | 10 ++++++++++ include/hw/loongarch/virt.h | 10 ---------- hw/loongarch/boot.c | 3 +++ hw/loongarch/virt.c | 3 --- .gitlab-ci.d/buildtest.yml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boot.h index 4ebcc89dcf..b3b870df1f 100644 --- a/include/hw/loongarch/boot.h +++ b/include/hw/loongarch/boot.h @@ -104,6 +104,16 @@ struct loongarch_boot_info { uint64_t a0, a1, a2; }; +extern struct memmap_entry *memmap_table; +extern unsigned memmap_entries; + +struct memmap_entry { + uint64_t address; + uint64_t length; + uint32_t type; + uint32_t reserved; +}; + void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *info); #endif /* HW_LOONGARCH_BOOT_H */ diff --git a/include/hw/loongarch/virt.h b/include/hw/loongarch/virt.h index 4e14bf6060..fdbd2b146f 100644 --- a/include/hw/loongarch/virt.h +++ b/include/hw/loongarch/virt.h @@ -37,16 +37,6 @@ #define FDT_BASE 0x100000 -extern struct memmap_entry *memmap_table; -extern unsigned memmap_entries; - -struct memmap_entry { - uint64_t address; - uint64_t length; - uint32_t type; - uint32_t reserved; -}; - struct LoongArchMachineState { /*< private >*/ MachineState parent_obj; diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 7d1630b2e7..03f6301a77 100644 --- a/hw/loongarch/boot.c +++ b/hw/loongarch/boot.c @@ -15,6 +15,9 @@ #include "sysemu/reset.h" #include "sysemu/qtest.h" +struct memmap_entry *memmap_table; +unsigned memmap_entries; + ram_addr_t initrd_offset; uint64_t initrd_size; diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index c0999878df..504e1fb349 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -516,9 +516,6 @@ static void virt_powerdown_req(Notifier *notifier, void *opaque) acpi_send_event(s->acpi_ged, ACPI_POWER_DOWN_STATUS); } -struct memmap_entry *memmap_table; -unsigned memmap_entries; - static void memmap_add_entry(uint64_t address, uint64_t length, uint32_t type) { /* Ensure there are no duplicate entries. */ diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index e9402a68a7..bab6194564 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -650,7 +650,7 @@ build-tci: # Check our reduced build configurations # requires libfdt: aarch64, arm, i386, loongarch64, microblaze, microblazeel, # mips64el, or1k, ppc, ppc64, riscv32, riscv64, rx, x86_64 -# does not build without boards: i386, loongarch64, s390x, sh4, sh4eb, x86_64 +# does not build without boards: i386, s390x, sh4, sh4eb, x86_64 build-without-defaults: extends: .native_build_job_template needs: