From patchwork Mon Aug 3 07:30:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1340168 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Z9F9vGR6; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BKqMP40Y2z9sRN for ; Mon, 3 Aug 2020 17:31:45 +1000 (AEST) Received: from localhost ([::1]:48814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2Uwh-0001W5-3l for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2020 03:31:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Uvq-0001TY-64; Mon, 03 Aug 2020 03:30:50 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:42921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Uvl-00065n-J8; Mon, 03 Aug 2020 03:30:49 -0400 Received: by mail-wr1-x42c.google.com with SMTP id r4so30216610wrx.9; Mon, 03 Aug 2020 00:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hOBhOxLF7AHcrdOd0fzIV622sepjBiKEqLdNfaOUdcc=; b=Z9F9vGR62s/79j2+7Na8Idl1CRKykygqL3pHXc6nIrenXtIyoQPox3jV5fH/lpGBtg U+heFK8wfk7YT1udUkEPFjYRRMeEeUb5S6EnF9b8wEJHa0fAZQVZ+pDJdR+S01IGATyR fTx6XQBkJ8DqSWBB/2pWI2NrZ7QFZ4W5XPSIvOX2P7ot0UhW5lHhJ9zgqdVuJvpPSA01 iq0TxqnFDt6GHA9Z/qWNpBOnMd3zTpUUKHI2UOhPxmqeLrA7YETPwnife3+EGcQIkajC f/Im6yx0PP8yRukMRHNHWGJLmnICCCfY/MbOBGMSufAZiI9oNg7J4oTt+QUKWBhauxBl LPrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hOBhOxLF7AHcrdOd0fzIV622sepjBiKEqLdNfaOUdcc=; b=ZgWWPEzcVNHFaocvUXSHnkhTpOjkNCmN6o1/9yqKeYyCsmOPe4rZqcASutm8UliLbz 6qmhXXVPkxiJwC5XdEMj8e/IMtipntBBZ5XAAJKvCCrIWKl/iPreeT21BVTd4Wpa0vue 8bDrUfsIUekQBFBjqGsmkbnrBbPB8tYK0xuG2s4Aq06wFsPq0zF8qOjrEWt/5C+e8vek IANeotSsoTI0QhgdobcHu5+IBjPEF1vDJdMhO8dnB79H08YvG+JD0NFzDgbawq2ZEr8C 4T+YzzSESseb9N2lAyNRRLeH1oE67HZ98ABQwnpNfQDpZONfCeOuGLSJvqJh1JrUTSbE yiSw== X-Gm-Message-State: AOAM533bF99oSQHK6LoqMHeHB/QoaZha0yO2XTqqK6DNZ0bpkHEQPzkX hEsfLk2eUVhvIihQUD2jTeg= X-Google-Smtp-Source: ABdhPJzuaf4hQRe1bTZidP9z+D8CXgqZPKXa+BcNQmvae2dxI6ZNAaugA61o09oujN9+tA8vOQ4YRA== X-Received: by 2002:adf:df85:: with SMTP id z5mr13421582wrl.267.1596439842473; Mon, 03 Aug 2020 00:30:42 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id 130sm23969438wme.26.2020.08.03.00.30.40 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Aug 2020 00:30:41 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v6 1/6] configure: Create symbolic links for pc-bios/*.elf files Date: Mon, 3 Aug 2020 00:30:27 -0700 Message-Id: <1596439832-29238-2-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> References: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=bmeng.cn@gmail.com; helo=mail-wr1-x42c.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: -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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng Now we need to ship the OpenSBI fw_dynamic.elf image for the RISC-V Spike machine, it requires us to create symbolic links for pc-bios/*.elf files. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - new patch: configure: Create symbolic links for pc-bios/*.elf files configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 2acc4d1..790b21d 100755 --- a/configure +++ b/configure @@ -8545,6 +8545,7 @@ LINKS="$LINKS tests/qemu-iotests/check" LINKS="$LINKS python" for bios_file in \ $source_path/pc-bios/*.bin \ + $source_path/pc-bios/*.elf \ $source_path/pc-bios/*.lid \ $source_path/pc-bios/*.rom \ $source_path/pc-bios/*.dtb \ From patchwork Mon Aug 3 07:30:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1340169 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vg9HvVP3; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BKqMQ3cj4z9sRN for ; Mon, 3 Aug 2020 17:31:46 +1000 (AEST) Received: from localhost ([::1]:48832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2Uwi-0001Wi-5V for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2020 03:31:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Uvo-0001QK-PY; Mon, 03 Aug 2020 03:30:48 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:34749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Uvm-00065v-OP; Mon, 03 Aug 2020 03:30:48 -0400 Received: by mail-wr1-x444.google.com with SMTP id f7so33223626wrw.1; Mon, 03 Aug 2020 00:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YoykrVtjYqt8oRbnP42shFLWN1mv4jmw4/LHlHynF4c=; b=vg9HvVP312vecH6MZZkKaIc4Yf1hftWL/W1GPOrPswYCbV7uMm6nQ4RSBd2q8RwUic qAnRn0RnF+obTxHiIK0AvuG3l+9NouV+03YbTwIpvxTP9486rhy4JIes/2MzNNBZq5ZB IHW4AOeTE5LuHprTDC/YUBCa62/VALfa2A1ZZlbIYC0E/hNbN+00C+Bz2RlghuraZeXx t3CPN2uWmiLXUwRveCNMVgEW2Ec/lbYjqVa0i2lK8Tz5I8z8LbDZnoTKR5o6MLuZkWqF DcAGimmFKLd19RHtX57V8bn2346Yy/s0bWG7SFGbYJpchb2XjhhGrsoyCDt5BhM16NmN D3uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YoykrVtjYqt8oRbnP42shFLWN1mv4jmw4/LHlHynF4c=; b=G4aRf2CGBlmMAayxoTzpGOrdMy8XMf+PYA+4XBo2sGM7mue9QhfKrXdRoomIbUbkBV 5r3oPOdS0+TMnJN+x0batfbLdVBLa+839Sc+1E3b7xXk8/dhrVrR4Jef/1S6Drr3M4YU jq/pMz954tCzlYK25TXV8KpaZQNSlOZUukSftnfhH+c9RAN2CrhuYpHNtcovLLUYEOcx d93ldBPDleocf1t5fH2n3Z0PoMTVBhAbTAFoN1H94MeCZwogjkyzt9nx0J/w/54+Sb4k IOtIGwS/I07PP6V3fo4hH1qS4/BuimMSJQvxTbjoAATMd/GA2J798SiLg7vNCX1HiOJi 7JNw== X-Gm-Message-State: AOAM531RkWwkV9UoPfUU2tSYoRIOVSg6NecdEYNRra6AvkN/V5pwT5qj 0VKExvAKc4MV2Vwh1riD4sl6ES4T X-Google-Smtp-Source: ABdhPJxyfm7mkydbgIffoCyUkY//5xhf5Nq/gI1q8naEQgDbZvtdWUVkVCaeXE4K/Uwcm1KedqhWHg== X-Received: by 2002:a5d:6a8b:: with SMTP id s11mr13784421wru.222.1596439844831; Mon, 03 Aug 2020 00:30:44 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id 130sm23969438wme.26.2020.08.03.00.30.42 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Aug 2020 00:30:44 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v6 2/6] roms/opensbi: Upgrade from v0.7 to v0.8 Date: Mon, 3 Aug 2020 00:30:28 -0700 Message-Id: <1596439832-29238-3-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> References: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=bmeng.cn@gmail.com; helo=mail-wr1-x444.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: -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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Bin Meng Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng Upgrade OpenSBI from v0.7 to v0.8. The v0.8 release includes the following commits: 1bb00ab lib: No need to provide default PMP region using platform callbacks a9eac67 include: sbi_platform: Combine reboot and shutdown into one callback 6585fab lib: utils: Add SiFive test device 4781545 platform: Add Nuclei UX600 platform 3a326af scripts: adapt binary archive script for Nuclei UX600 5bdf022 firmware: fw_base: Remove CSR_MTVEC update check e6c1345 lib: utils/serial: Skip baudrate config if input frequency is zero 01a8c8e lib: utils: Improve fdt_parse_uart8250() API 0a0093b lib: utils: Add fdt_parse_uart8250_node() function 243b0d0 lib: utils: Remove redundant clint_ipi_sync() declaration e3ad7c1 lib: utils: Rename fdt_parse_clint() to fdt_parse_compat_addr() a39cd6f lib: utils: Add FDT match table based node lookup dd33b9e lib: utils: Make fdt_get_node_addr_size() public function 66185b3 lib: utils: Add fdt_parse_sifive_uart_node() function 19e966b lib: utils: Add fdt_parse_hart_id() function 44dd7be lib: utils: Add fdt_parse_max_hart_id() API f0eb503 lib: utils: Add fdt_parse_plic_node() function 1ac794c include: Add array_size() macro 8ff2b94 lib: utils: Add simple FDT timer framework 76f0f81 lib: utils: Add simple FDT ipi framework 75322a6 lib: utils: Add simple FDT irqchip framework 76a8940 lib: utils: Add simple FDT serial framework 7cc6fa4 lib: utils: Add simple FDT reset framework 4d06353 firmware: fw_base: Introduce optional fw_platform_init() f1aa9e5 platform: Add generic FDT based platform support 1f21b99 lib: sbi: Print platform hart count at boot time 2ba7087 scripts: Add generic platform to create-binary-archive.sh 4f18c6e platform: generic: Add Sifive FU540 TLB flush range limit override 13717a8 platform: Remove qemu/virt directory 65c06b0 platform: Remove spike directory d626037 docs: Add missing links in platform.md 7993ca2 include: sbi: Remove redundant page table related defines 5338679 lib: sbi_tlb: Fix remote TLB HFENCE VVMA implementation dc38929 lib: sbi: Improve misa_string() implementation 433bac7 docs: platform/generic: Add details about stdout-path DT property b4efa70 docs: platform/generic: Add details about IPI and timer expectations dfd9dd6 docs: Add platform requirements document c2286b6 docs: Fix ordering of pages in table of contents 7be75f5 docs: Don't use italic text in page title 63a513e lib: Rename unprivileged trap handler aef9a60 lib: Add csr detect support 13ca20d lib: Create a separate math helper function file 79d0fad lib: utils: Update reserved memory fdt node even if PMP is not present 6a053f6 lib: Add support for hart specific features b2df751 platform: Move platform features to hart 4938024 platform: fpga: Remove redundant platform specific features ec0d2a7 lib: timer: Provide a hart based timer feature 1f235ec lib: Add platform features in boot time print 22c4334 lib: Add hart features in boot time print 36833ab lib: Optimize inline assembly for unprivilege access functions 38a4b54 firmware: Correct spelling mistakes 28b4052 lib: sbi: detect features before everything else in sbi_hart_init() 4984183 lib: sbi: Improve get_feature_str() implementation and usage 3aa1036 lib: sbi: Remove extra spaces from boot time prints 3a8fc81 lib: sbi: Print platform HART count just before boot HART id 63b0f5f include: sbi: Use scratch pointer as parmeter in HART feature APIs 2966510 lib: sbi: Few cosmetic improvements to HART feature detection a38bea9 lib: sbi_hart: Detect number of supported PMP regions 89ba634 include: sbi: Add firmware extension constants 73d6ef3 lib: utils: Remove redundant parameters from PLIC init functions 446a9c6 lib: utils: Allow PLIC functions to be used for multiple PLICs 2c685c2 lib: utils: Extend fdt_find_match() Implementation d30bb68 lib: utils/irqchip: Initialize all matching irqchip DT nodes a9a9751 lib: utils: Allow CLINT functions to be used for multiple CLINTs 569dd64 lib: utils: Add fdt_parse_clint_node() function 6956e83 lib: utils/ipi: Initialize all matching ipi DT nodes a63f05f lib: utils/timer: Initialize all matching timer DT nodes 30b6040 Makefile: Fix builtin DTB compilation for out-of-tree platforms 64f1408 firmware: fw_base: Make builtin DTB available to fw_platform_init() 4ce6b7a firmware: fw_base: Don't OR forced FW_OPTIONS 86ec534 firmware: Allow fw_platform_init() to return updated FDT location c6c65ee Makefile: Preprocess builtin DTS 4e3876d Makefile: Add mechanism for platforms to have multiple builtin DTBs 72019ee platform: kendryte/k210: Use new mechanism of builtin DTB 51f0e4a firmware: Remove FW_PAYLOAD_FDT and related documentation 1b8c012 lib: Add RISC-V hypervisor v0.6.1 support 79bfd67 docs: Use doxygen config to mark the main page 106b888 docs: Remove redundant documentation about combined payload use case 9802906 platform: Add AE350 platform specific SBI handler 32f87e5 platform: Add AE350 cache control SBIs e2c3f01 lib: Fix __sbi_hfence_gvma_vmid_gpa() and __sbi_hfence_vvma_asid_va() 6966ad0 platform/lib: Allow the OS to map the regions that are protected by PMP 518e85c platform: Update Nuclei ux600 platform support d5725c2 lib: Don't print delegation CSRs if there is no S-Mode 637b348 lib: Fix the SBI_HART_HAS_MCOUNTEREN feature check db56ef3 platform: Add support for Shakti C-class SoC from IIT-M 9bd5f8f lib: sbi: Fix 32/64 bits variable compatibility 2314101 lib: Don't return any invalid error from SBI ecall a98258d include: Bump-up version to 0.8 Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - Upgrade OpenSBI to v0.8 release roms/opensbi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/opensbi b/roms/opensbi index 9f1b72c..a98258d 160000 --- a/roms/opensbi +++ b/roms/opensbi @@ -1 +1 @@ -Subproject commit 9f1b72ce66d659e91013b358939e832fb27223f5 +Subproject commit a98258d0b537a295f517bbc8d813007336731fa9 From patchwork Mon Aug 3 07:30:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1340170 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=PTC/FycT; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BKqMR59Mmz9sTY for ; Mon, 3 Aug 2020 17:31:47 +1000 (AEST) Received: from localhost ([::1]:48938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2Uwj-0001Zi-4l for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2020 03:31:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Uvr-0001WF-Hc; Mon, 03 Aug 2020 03:30:51 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:51703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Uvp-00066Q-NE; Mon, 03 Aug 2020 03:30:51 -0400 Received: by mail-wm1-x342.google.com with SMTP id p14so13390385wmg.1; Mon, 03 Aug 2020 00:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rwBr69aKqgDUi0/A7pROTSLiqSwaDFaBxL8GlGAjDF0=; b=PTC/FycT8CzHBVoqL0iflTDofKuQhEgQzUPd9sXXlu/eMQ7mGDhFreRJsWmLLUxGQu zAdhkdWdxQDfIemGLjYsPkWViLt+QsK7Iol50ML4VN+1Jhw/26XzqYspac4K5xBNrwU+ ClB1NsLd6YJd/uF3QmQiYBW4cPC9JygZ2etjYr/E58lXoAvhD12B4bENKdvTMOrEzj0f zs4wPlrRTPaxG0/14XdQ3QCkHjGja1QkJp7oKZIGJrCcnn2d/jPBootNunOBANuFBifL NxUhi7fng2VvsE6GU9wCBk4Zzg+FVbwJdjkSPRm76lIIahoDnOPTIQXprP6DNDU5KX+R jt6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rwBr69aKqgDUi0/A7pROTSLiqSwaDFaBxL8GlGAjDF0=; b=LVdXxWc5eJacyL6pfeDE1mr1VEQocI9F+Rc0h4rq60kbGQM0OkxI2l4sWotYlmf82v iSyJXe7dL8c11S7B4p+uATyPshV/4A1OJxsdQaZw/rst7QUaFuHnFVZRsZotmDNRx3uS JO/HSmr1NblDdXpZIkL/grjwKfyo2HhjtUQxQKdHcu8eX3ERmKe1FKjuTjjNyfVnODQT uvpizgm3cDC1ok2ZI+G3dwR6b0T90WVuv3ucf4K/wJG7qAxtSv+/bdc8AjNE0XMcqe2v EyynFBiNpVmuAtbAITvdF14BSbD9ijXK6iC12DGCo5zr6e34b7yBKETTrHjWjRb2tB7/ lNvA== X-Gm-Message-State: AOAM533Gc9TKDQ36c1RGQjuTTUIGx/gL8OhMCaFdjN5vRUGHVI1gveuP NB1gHEEUmhT8rbIbBn2/byE= X-Google-Smtp-Source: ABdhPJzrEySOHGYuHse4FS4X8/T5eecKDM7dbikf34to/iMfW1EPi/6LMZ+8cwAgWq48LCgyvTXfzQ== X-Received: by 2002:a1c:4e0d:: with SMTP id g13mr14585678wmh.177.1596439847059; Mon, 03 Aug 2020 00:30:47 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id 130sm23969438wme.26.2020.08.03.00.30.45 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Aug 2020 00:30:46 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v6 3/6] roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware Date: Mon, 3 Aug 2020 00:30:29 -0700 Message-Id: <1596439832-29238-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> References: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=bmeng.cn@gmail.com; helo=mail-wm1-x342.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: -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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently. Update our Makefile to build the generic platform instead of building virt and sifive_u separately for RISC-V OpenSBI firmware, and change to use fw_dynamic type images as well. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- (no changes since v3) Changes in v3: - Change fw_jump to fw_dynamic in the make rules Changes in v2: - Copy the ELF images too in the make rules roms/Makefile | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index f9acf39..5d9f15b 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -64,10 +64,8 @@ default help: @echo " u-boot.e500 -- update u-boot.e500" @echo " u-boot.sam460 -- update u-boot.sam460" @echo " efi -- update UEFI (edk2) platform firmware" - @echo " opensbi32-virt -- update OpenSBI for 32-bit virt machine" - @echo " opensbi64-virt -- update OpenSBI for 64-bit virt machine" - @echo " opensbi32-sifive_u -- update OpenSBI for 32-bit sifive_u machine" - @echo " opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u machine" + @echo " opensbi32-generic -- update OpenSBI for 32-bit generic machine" + @echo " opensbi64-generic -- update OpenSBI for 64-bit generic machine" @echo " bios-microvm -- update bios-microvm.bin (qboot)" @echo " clean -- delete the files generated by the previous" \ "build targets" @@ -170,29 +168,19 @@ skiboot: efi: edk2-basetools $(MAKE) -f Makefile.edk2 -opensbi32-virt: +opensbi32-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv32_cross_prefix) \ - PLATFORM="qemu/virt" - cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-virt-fw_jump.bin + PLATFORM="generic" + cp opensbi/build/platform/generic/firmware/fw_dynamic.bin ../pc-bios/opensbi-riscv32-generic-fw_dynamic.bin + cp opensbi/build/platform/generic/firmware/fw_dynamic.elf ../pc-bios/opensbi-riscv32-generic-fw_dynamic.elf -opensbi64-virt: +opensbi64-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv64_cross_prefix) \ - PLATFORM="qemu/virt" - cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-virt-fw_jump.bin - -opensbi32-sifive_u: - $(MAKE) -C opensbi \ - CROSS_COMPILE=$(riscv32_cross_prefix) \ - PLATFORM="sifive/fu540" - cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin - -opensbi64-sifive_u: - $(MAKE) -C opensbi \ - CROSS_COMPILE=$(riscv64_cross_prefix) \ - PLATFORM="sifive/fu540" - cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin + PLATFORM="generic" + cp opensbi/build/platform/generic/firmware/fw_dynamic.bin ../pc-bios/opensbi-riscv64-generic-fw_dynamic.bin + cp opensbi/build/platform/generic/firmware/fw_dynamic.elf ../pc-bios/opensbi-riscv64-generic-fw_dynamic.elf bios-microvm: $(MAKE) -C qboot From patchwork Mon Aug 3 07:30:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1340177 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=l5MlNXt/; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BKqPY5Qcrz9sTb for ; Mon, 3 Aug 2020 17:33:37 +1000 (AEST) Received: from localhost ([::1]:57762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2UyV-0005CR-Fj for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2020 03:33:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Uvw-0001ZP-MS; Mon, 03 Aug 2020 03:30:56 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:55786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Uvr-00066o-5h; Mon, 03 Aug 2020 03:30:56 -0400 Received: by mail-wm1-x342.google.com with SMTP id 9so13349948wmj.5; Mon, 03 Aug 2020 00:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DCtIbJc5eztIkmbNLe9RE/thb6UUj+7roPrWBTHLItE=; b=l5MlNXt/8A7C3c/Q3Xxu//i5JNKnEED4083u7NGSdRrMJWVDGdzDLW3fmGLGs++qqO 6aQjffghpTBdatOCkthW8zxOccMU78TraDxrnBFSWmVeFbHPAvHemBACKYOfRDxagqiT OGmenwJjkjgbg6E/p9Z+orFP9v2QkYGswflHZypTxq5uONuVC8Fu4IsG0RIUFHO/V3wq jn5OIQ1/GlL0vZhGpXtbJ1vBvK7Cnl6BUlin0sFIIEaIuAqBnFUh2Evq2gPizPxbfwI3 IHhW10jmN9cNRLhRPgOdJNbFHc7idG9GghAj8+LkfhqLBPBY6rZn+g+o1/tJybRKPoTX V7zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DCtIbJc5eztIkmbNLe9RE/thb6UUj+7roPrWBTHLItE=; b=BwpGjf/t1j4N7O1T3AZZCsCmGerVOOacvV/gb1czCl7NPit4F6TWLFzZOKw036RWs0 mwdA18b7dK8aIAgvuyJgiFCGD03VOd1wPSufLAGcYumb1pMJzokqYs78dZPu/gPMvopy KJ7GEe4Y0Roy5te0jgyVd/W78qwbUt+ESfydpADDosV4jyFHpStcMgTGi2UC4hxZlPhb SNroYj5A0496xjpsPzRGbJ0sHBXxlzJcS7DzWBpyUFn+xixnUg1lgvjQMElQ2SkNbiHg M6gZ2TUvlBrFqbau2MnuYsHc7kth5CWfBPcivqraj+VXdobRII7OUeTTwypStG80z7Jt vV+w== X-Gm-Message-State: AOAM530tIslTOYnF5+4B+FvUo4wbFrKQ0pbHKJ51Ry8o2i1nmn4zE47M brX/cRSV/v8r0weQeTCfoy0= X-Google-Smtp-Source: ABdhPJzApWO7Q206rCweO9GINyHicy+DX+z62MLLGeSnXGcUM2LmmZ9r9j12wYDPoyFPXCPFn2EvLA== X-Received: by 2002:a1c:2bc1:: with SMTP id r184mr15342965wmr.133.1596439849377; Mon, 03 Aug 2020 00:30:49 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id 130sm23969438wme.26.2020.08.03.00.30.47 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Aug 2020 00:30:48 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v6 4/6] hw/riscv: Use pre-built bios image of generic platform for virt & sifive_u Date: Mon, 3 Aug 2020 00:30:30 -0700 Message-Id: <1596439832-29238-5-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> References: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=bmeng.cn@gmail.com; helo=mail-wm1-x342.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: -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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Bin Meng Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng Update virt and sifive_u machines to use the opensbi fw_dynamic bios image built for the generic FDT platform. Remove the out-of-date no longer used bios images. Note: 1. To test 32-bit Linux kernel on QEMU 'sifive_u' 32-bit machine, the following patch is needed: http://lists.infradead.org/pipermail/linux-riscv/2020-July/001213.html 2. To test 64-bit Linux 5.3 kernel on QEMU 'virt' or 'sifive_u' 64-bit machines, the following commit should be cherry-picked to 5.3: commit 922b0375fc93fb1a20c5617e37c389c26bbccb70 Author: Albert Ou Date: Fri Sep 27 16:14:18 2019 -0700 riscv: Fix memblock reservation for device tree blob Linux 5.4 or above already contains this commit/fix. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- Changes in v6: - Add information about Linux kernel tested Changes in v5: - Include the generic fw_dynamic.bin in the Makefile for `make install` bisection Changes in v4: - Remove old binaries in the Makefile for `make install` bisection Changes in v3: - Change to fw_dynamic.bin for virt & sifive_u Makefile | 3 +-- hw/riscv/sifive_u.c | 4 ++-- hw/riscv/virt.c | 4 ++-- pc-bios/opensbi-riscv32-generic-fw_dynamic.bin | Bin 0 -> 62144 bytes pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin | Bin 49520 -> 0 bytes pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin 49504 -> 0 bytes pc-bios/opensbi-riscv64-generic-fw_dynamic.bin | Bin 0 -> 70792 bytes pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 57936 -> 0 bytes pc-bios/opensbi-riscv64-virt-fw_jump.bin | Bin 57920 -> 0 bytes 9 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 pc-bios/opensbi-riscv32-generic-fw_dynamic.bin delete mode 100644 pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin delete mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin create mode 100644 pc-bios/opensbi-riscv64-generic-fw_dynamic.bin delete mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin delete mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin Binary files a/pc-bios/opensbi-riscv64-virt-fw_jump.bin and /dev/null differ diff --git a/Makefile b/Makefile index c2120d8..9d87135 100644 --- a/Makefile +++ b/Makefile @@ -842,8 +842,7 @@ u-boot.e500 u-boot-sam460-20100605.bin \ qemu_vga.ndrv \ edk2-licenses.txt \ hppa-firmware.img \ -opensbi-riscv32-sifive_u-fw_jump.bin opensbi-riscv32-virt-fw_jump.bin \ -opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin +opensbi-riscv32-generic-fw_dynamic.bin opensbi-riscv64-generic-fw_dynamic.bin DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \ diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 55b3383..18301e6 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -60,9 +60,9 @@ #include #if defined(TARGET_RISCV32) -# define BIOS_FILENAME "opensbi-riscv32-sifive_u-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv32-generic-fw_dynamic.bin" #else -# define BIOS_FILENAME "opensbi-riscv64-sifive_u-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_dynamic.bin" #endif static const struct MemmapEntry { diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 55a907b..6e91cf1 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -43,9 +43,9 @@ #include "hw/pci-host/gpex.h" #if defined(TARGET_RISCV32) -# define BIOS_FILENAME "opensbi-riscv32-virt-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv32-generic-fw_dynamic.bin" #else -# define BIOS_FILENAME "opensbi-riscv64-virt-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_dynamic.bin" #endif static const struct MemmapEntry { diff --git a/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin b/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin new file mode 100644 index 0000000..23b4dfb Binary files /dev/null and b/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin differ diff --git a/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin b/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin deleted file mode 100644 index 3e0da54..0000000 Binary files a/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin and /dev/null differ diff --git a/pc-bios/opensbi-riscv32-virt-fw_jump.bin b/pc-bios/opensbi-riscv32-virt-fw_jump.bin deleted file mode 100644 index bc56ed6..0000000 Binary files a/pc-bios/opensbi-riscv32-virt-fw_jump.bin and /dev/null differ diff --git a/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin b/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin new file mode 100644 index 0000000..16c0cf4 Binary files /dev/null and b/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin differ diff --git a/pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin b/pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin deleted file mode 100644 index 1acee86..0000000 Binary files a/pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin and /dev/null differ diff --git a/pc-bios/opensbi-riscv64-virt-fw_jump.bin b/pc-bios/opensbi-riscv64-virt-fw_jump.bin deleted file mode 100644 index c62f2b4..0000000 From patchwork Mon Aug 3 07:30:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1340175 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=aXPXy3eQ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BKqPY1BjQz9sTY for ; Mon, 3 Aug 2020 17:33:37 +1000 (AEST) Received: from localhost ([::1]:57714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2UyU-0005BL-UW for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2020 03:33:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Uvz-0001br-J9; Mon, 03 Aug 2020 03:31:00 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:38473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Uvw-000675-LC; Mon, 03 Aug 2020 03:30:59 -0400 Received: by mail-wr1-x442.google.com with SMTP id a14so33211915wra.5; Mon, 03 Aug 2020 00:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M7TrC+MxPqLAfShenNJlui1NTwtnKhW8UXdzkGWvhA4=; b=aXPXy3eQIfDwEzAeNi9G7LG71wiVp/LNRbpzWPnVg/8nKm8giCv71Af8VdrlBXMnZA aSVZWsDzX4YJuPM19FewavFha/xQx+DgNG9vzBOedeaJVTx5k2/eapblux6LVcG+3qn0 D67nZ+ZAlM60QkxfMy/+sw8oBlV2CpqmdXn174pg78uX3myjyrrmqgwNL0T5+6mejkvS xx4R7NckJhitC7KDTzIqS109+8++d/88ON+J3X++OoJRUBRb66iFaE+MV+BRT4e+5rkA ipC5gZntI3a4qwMaUdgPDSWN4QIstbCe0aFcbuBUbDbDp5B8VZ4EO8Za/bLpaXTqkyqQ KAGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=M7TrC+MxPqLAfShenNJlui1NTwtnKhW8UXdzkGWvhA4=; b=Pwy0bZqw8cvYHgIdPBrMBPfeRiAG0KWpiUhu3MT5gf/leV28omBfJZk4OyNwS0oNZv CBsxYHULP+al2MQjL4Wmp6//XxstHab+Ojd0MRx3FJXrRNj8lgZA0cYiLdFpSKVyBm+H jH1dp5de8+VLqKuBEqO/vTknqLu9CGGNhLYDobubVryNzNLbQv6tGUvtpDa2Gw6aa386 sonoF7ptlT0bWeXovOwnFEKn7N2lQ4uVKykRQK3Yn61+RqPsQkfO6y+B+QDGUSZESCMb AtG4rEB9tWCvRlePhYONMQWEzf8iFySW5/egvLtrqwkRGEzIA+c62dKToITf+4uC2M6k bkZA== X-Gm-Message-State: AOAM533xYGPd5yeaKhnwSiwq8N2xaQkQmZGw/cwKFhe8iLHBERGdqocn G6eLBykgZOU6GyNPoYL7Jhl6G+Kh X-Google-Smtp-Source: ABdhPJzipqUSYUB57huamJCQ+/WWh6IWkNyYce3NNQYzZZCzJonRnMP8WRR5O2DzjXL8jq8DX67azg== X-Received: by 2002:a5d:4604:: with SMTP id t4mr13562987wrq.417.1596439851694; Mon, 03 Aug 2020 00:30:51 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id 130sm23969438wme.26.2020.08.03.00.30.49 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Aug 2020 00:30:51 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v6 5/6] hw/riscv: spike: Change the default bios to use generic platform image Date: Mon, 3 Aug 2020 00:30:31 -0700 Message-Id: <1596439832-29238-6-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> References: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=bmeng.cn@gmail.com; helo=mail-wr1-x442.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: -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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng To keep sync with other RISC-V machines, change the default bios to use generic platform fw_dynamic.elf image. While we are here, add some comments to mention that using ELF files for the Spike machine was intentional. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- Changes in v6: - Squash the Makefile ELF changes into this commit Changes in v3: - Change to fw_dynamic.elf for Spike Makefile | 3 ++- hw/riscv/spike.c | 9 +++++++-- pc-bios/opensbi-riscv32-generic-fw_dynamic.elf | Bin 0 -> 558668 bytes pc-bios/opensbi-riscv64-generic-fw_dynamic.elf | Bin 0 -> 620424 bytes 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 pc-bios/opensbi-riscv32-generic-fw_dynamic.elf create mode 100644 pc-bios/opensbi-riscv64-generic-fw_dynamic.elf Binary files /dev/null and b/pc-bios/opensbi-riscv64-generic-fw_dynamic.elf differ diff --git a/Makefile b/Makefile index 9d87135..58db99f 100644 --- a/Makefile +++ b/Makefile @@ -842,7 +842,8 @@ u-boot.e500 u-boot-sam460-20100605.bin \ qemu_vga.ndrv \ edk2-licenses.txt \ hppa-firmware.img \ -opensbi-riscv32-generic-fw_dynamic.bin opensbi-riscv64-generic-fw_dynamic.bin +opensbi-riscv32-generic-fw_dynamic.bin opensbi-riscv64-generic-fw_dynamic.bin \ +opensbi-riscv32-generic-fw_dynamic.elf opensbi-riscv64-generic-fw_dynamic.elf DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \ diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index 7b23a29..13958bd 100644 --- a/hw/riscv/spike.c +++ b/hw/riscv/spike.c @@ -42,10 +42,15 @@ #include "sysemu/qtest.h" #include "sysemu/sysemu.h" +/* + * Not like other RISC-V machines that use plain binary bios images, + * keeping ELF files here was intentional because BIN files don't work + * for the Spike machine as HTIF emulation depends on ELF parsing. + */ #if defined(TARGET_RISCV32) -# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv32-generic-fw_dynamic.elf" #else -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_dynamic.elf" #endif static const struct MemmapEntry { diff --git a/pc-bios/opensbi-riscv32-generic-fw_dynamic.elf b/pc-bios/opensbi-riscv32-generic-fw_dynamic.elf new file mode 100644 index 0000000..eb9ebf5 Binary files /dev/null and b/pc-bios/opensbi-riscv32-generic-fw_dynamic.elf differ diff --git a/pc-bios/opensbi-riscv64-generic-fw_dynamic.elf b/pc-bios/opensbi-riscv64-generic-fw_dynamic.elf new file mode 100644 index 0000000..642a64e From patchwork Mon Aug 3 07:30:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1340182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ay8rFZkn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BKqQt4TrTz9sTY for ; Mon, 3 Aug 2020 17:34:46 +1000 (AEST) Received: from localhost ([::1]:34658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2Uzc-0007Iw-DL for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2020 03:34:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Uw2-0001dn-5W; Mon, 03 Aug 2020 03:31:02 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:55789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Uvw-00067I-Mb; Mon, 03 Aug 2020 03:31:01 -0400 Received: by mail-wm1-x344.google.com with SMTP id 9so13350141wmj.5; Mon, 03 Aug 2020 00:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gPk8wbtFKUEMIlCNhLaq8+ecNgu5uEuNf0fX/hiwAcE=; b=ay8rFZknwf7n8UgDde4ul3vTyVbseIkCXml5U2WPdLodlF2VheD8xyKBszTM1iHQQ9 V7vnSGsfa6dsbKXHgYZSLDM4HsK2TYjK/BfApfIjATUMnDyFies6nOmu1diWOjWMgmw2 wGsYYTSXBofUG/6bVa4Eaxdyr0fxR0OnI1LBoPS3wUXSVIr2BA1V1r9Ol+20ESO7qWhA C/NY4xXDCyQOya6wfs58i4YSSj/9BTBGcG1h5aF6OXbe3cUe4DRg+DWADbuV9fqzdaqf RJ5kccNsH7coUfu90xIPEBx152akY+l/X0br6Gu4DlXT9DSdg3N/HVSeNsyoNP1JhAT8 Vvfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gPk8wbtFKUEMIlCNhLaq8+ecNgu5uEuNf0fX/hiwAcE=; b=eZgGSWVDufYSxmMb19VJBbCyl4OxKmsjY601iTrSaC+cCdjB5TshLKWWkmoVnyPMGe EcoYAojmr0mTdZep9527u6VJLoChvOT+wGDMLMtOgN3o5C3mvQmg7EK6JdJny5FrJsqM nXdISihwjX+yLEcNSCNgbGVFJtlFevCeFU157e0WsN1lPl01Wrro6WPRLF09eiXX7mdV gaAvk5E1GQ1kr10mWd/w0njhnJ6mKxjz/rr5ryKiWO86+yYseNyht+LhgKeK1GDY9LSl abw7XSlBewpYmFIz1zdT4zIWGHMBSKjPHZwhDjrEInLiOLFzog1P0di8fA6RLsdZ5lD6 XzGg== X-Gm-Message-State: AOAM531zSGekdZ77UPjvxuPYJg02j8Nb8W8N4HCpr/Du0QkOFx0gKSMa h9mFy5HCbFQmkQNzNrsiD8I= X-Google-Smtp-Source: ABdhPJyZ0Iuv8uf1qVl4xz5y8jugUH/Mop5YZDARo6YpC/Dao92rIdVjdoOboL8+by3b2xrIoKzFJw== X-Received: by 2002:a1c:9a02:: with SMTP id c2mr16019395wme.16.1596439854092; Mon, 03 Aug 2020 00:30:54 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id 130sm23969438wme.26.2020.08.03.00.30.52 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Aug 2020 00:30:53 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v6 6/6] gitlab-ci/opensbi: Update GitLab CI to build generic platform Date: Mon, 3 Aug 2020 00:30:32 -0700 Message-Id: <1596439832-29238-7-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> References: <1596439832-29238-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=bmeng.cn@gmail.com; helo=mail-wm1-x344.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: -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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng This updates the GitLab CI opensbi job to build opensbi bios images for the generic platform. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- (no changes since v3) Changes in v3: - Generate fw_dynamic images in the artifacts Changes in v2: - Include ELF images in the artifacts .gitlab-ci.d/opensbi.yml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index 62088ec..5b13047 100644 --- a/.gitlab-ci.d/opensbi.yml +++ b/.gitlab-ci.d/opensbi.yml @@ -35,18 +35,14 @@ build-opensbi: when: always artifacts: paths: # 'artifacts.zip' will contains the following files: - - pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin - - pc-bios/opensbi-riscv32-virt-fw_jump.bin - - pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin - - pc-bios/opensbi-riscv64-virt-fw_jump.bin - - opensbi32-virt-stdout.log - - opensbi32-virt-stderr.log - - opensbi64-virt-stdout.log - - opensbi64-virt-stderr.log - - opensbi32-sifive_u-stdout.log - - opensbi32-sifive_u-stderr.log - - opensbi64-sifive_u-stdout.log - - opensbi64-sifive_u-stderr.log + - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin + - pc-bios/opensbi-riscv32-generic-fw_dynamic.elf + - pc-bios/opensbi-riscv64-generic-fw_dynamic.bin + - pc-bios/opensbi-riscv64-generic-fw_dynamic.elf + - opensbi32-generic-stdout.log + - opensbi32-generic-stderr.log + - opensbi64-generic-stdout.log + - opensbi64-generic-stderr.log image: $CI_REGISTRY_IMAGE:opensbi-cross-build variables: GIT_DEPTH: 3 @@ -55,10 +51,6 @@ build-opensbi: - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1)) - echo "=== Using ${JOBS} simultaneous jobs ===" - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi32-virt 2>&1 1>opensbi32-virt-stdout.log | tee -a opensbi32-virt-stderr.log >&2 + - make -j${JOBS} -C roms opensbi32-generic 2>&1 1>opensbi32-generic-stdout.log | tee -a opensbi32-generic-stderr.log >&2 - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi64-virt 2>&1 1>opensbi64-virt-stdout.log | tee -a opensbi64-virt-stderr.log >&2 - - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi32-sifive_u 2>&1 1>opensbi32-sifive_u-stdout.log | tee -a opensbi32-sifive_u-stderr.log >&2 - - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi64-sifive_u 2>&1 1>opensbi64-sifive_u-stdout.log | tee -a opensbi64-sifive_u-stderr.log >&2 + - make -j${JOBS} -C roms opensbi64-generic 2>&1 1>opensbi64-generic-stdout.log | tee -a opensbi64-generic-stderr.log >&2