From patchwork Tue Nov 20 11:29:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1000411 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=brainfault.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=brainfault-org.20150623.gappssmtp.com header.i=@brainfault-org.20150623.gappssmtp.com header.b="A0iYp+db"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42zk5r03nWz9s3l for ; Tue, 20 Nov 2018 22:30:23 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 95DC7C22022; Tue, 20 Nov 2018 11:30:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 76D67C22044; Tue, 20 Nov 2018 11:30:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 816E7C22043; Tue, 20 Nov 2018 11:29:55 +0000 (UTC) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by lists.denx.de (Postfix) with ESMTPS id 9BADAC22006 for ; Tue, 20 Nov 2018 11:29:51 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id d72so774363pga.9 for ; Tue, 20 Nov 2018 03:29:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LlCwKDErZLaNmwGn+7rfoVTjpeAgbsjwgt4dvvD61GQ=; b=A0iYp+dbf3vQrsGGyLsxSqHzGIRNRpbo0jZCldHKIZd0QOyAgdjX3O9gtwmhWELD4o OMgdalONLTo0nt5UB6x+jYD74MHh3SdbLnPhh1eSZkzoD8ZgSenh/q/Bvqukp7zU33pH vytqP1C6+jE/qFr3KYJzVHRy09TmjJNCZ3eM9ft+qN21LXEtn04kLxH6O2+0EMTc7gqw mj3UWBy9ngTkKajppZeVElhk2iVUhP9KXZfVf/wET9WpwSyeRm7sSazLfXz8+cWtDSGf R3Af22K0x86HvniJCgVX1rEraFyNvrsumYPf9ufEigeR4gef8IkahGm3Z1qInEJIcLw5 0eMQ== 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=LlCwKDErZLaNmwGn+7rfoVTjpeAgbsjwgt4dvvD61GQ=; b=LOw41aAM1oEm+wfpyg/ixSxdkxNhqOaJbxyrxjo8vGSyyRHSOscl2eM333ziGdLubn +J33yVwneaNsxX+UtWqtv7dyWtTzvfpfF7FFQst5vj/CrR6/oftRMszG5o9Dfc+uQrRm sKpzNgM6KjCrrP1ZhgIQwkY5kgSAr51507YLxv9iN3ao78AEWLov6oECC1aUiKr1cB2f tMJ5vcQjHQH/S10pOf6OcVP3T/P0SRZYb+Ktk4Fy0wIzA9RpDXnh6ZDyrsSKs+kK0S+A 4VAGx4c8dRg90mQ+nMG075heR6MCzMgnmZw1IoOZi03tgXJd2oOiRxiq5YhbMSpNISHn RzqA== X-Gm-Message-State: AGRZ1gK84ZlEXYSlR8kmAUpo/U1i3nCw7SB62h2LYzT9oKVb+dI2bPX5 ZtV2d4GpDKjY7H7JBQAet4M+Ig== X-Google-Smtp-Source: AFSGD/VE2RP7i/CKT283r8VZvLYXggllcqkwxTAVDZXCB/Dm6yVmDQDEGGxRRILBOBMKr99+P1prcA== X-Received: by 2002:a63:801:: with SMTP id 1mr1502318pgi.275.1542713389958; Tue, 20 Nov 2018 03:29:49 -0800 (PST) Received: from localhost.localdomain ([106.51.16.59]) by smtp.googlemail.com with ESMTPSA id m10-v6sm97725026pfg.180.2018.11.20.03.29.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 03:29:49 -0800 (PST) From: Anup Patel To: Rick Chen Date: Tue, 20 Nov 2018 16:59:31 +0530 Message-Id: <20181120112933.23700-2-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120112933.23700-1-anup@brainfault.org> References: <20181120112933.23700-1-anup@brainfault.org> Cc: U-Boot Mailing List , Palmer Dabbelt , Alexander Graf , Christoph Hellwig , Atish Patra Subject: [U-Boot] [PATCH v2 1/3] riscv: Add kconfig option to run u-boot in S-mode X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds kconfig option RISCV_SMODE to run u-boot in S-mode. When this opition is enabled we use s CSRs instead of m CSRs. It is important to note that there is no equivalent S-mode CSR for misa and mhartid CSRs so we expect M-mode runtime firmware (BBL or equivalent) to emulate misa and mhartid CSR read. Eventually, we will have patches to avoid accessing misa and mhartid from S-mode. Signed-off-by: Anup Patel Reviewed-by: Bin Meng Tested-by: Bin Meng --- arch/riscv/Kconfig | 6 ++++++ arch/riscv/cpu/start.S | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 3e0af55e71..88bc0d2a43 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -55,6 +55,12 @@ config RISCV_ISA_C config RISCV_ISA_A def_bool y +config RISCV_SMODE + bool "Run in S-Mode" + default n + help + Enable this option to build an U-Boot for RISC-V S-Mode + config 32BIT bool diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 5af189b338..e4276e8e19 100644 --- a/arch/riscv/cpu/start.S +++ b/arch/riscv/cpu/start.S @@ -39,10 +39,18 @@ _start: mv s1, a1 la t0, trap_entry +#ifdef CONFIG_RISCV_SMODE + csrw stvec, t0 +#else csrw mtvec, t0 +#endif /* mask all interrupts */ +#ifdef CONFIG_RISCV_SMODE + csrw sie, zero +#else csrw mie, zero +#endif /* Enable cache */ jal icache_enable @@ -164,7 +172,11 @@ fix_rela_dyn: */ la t0, trap_entry add t0, t0, t6 +#ifdef CONFIG_RISCV_SMODE + csrw stvec, t0 +#else csrw mtvec, t0 +#endif clear_bss: la t0, __bss_start /* t0 <- rel __bss_start in FLASH */ @@ -236,17 +248,34 @@ trap_entry: SREG x29, 29*REGBYTES(sp) SREG x30, 30*REGBYTES(sp) SREG x31, 31*REGBYTES(sp) +#ifdef CONFIG_RISCV_SMODE + csrr a0, scause + csrr a1, sepc +#else csrr a0, mcause csrr a1, mepc +#endif mv a2, sp jal handle_trap +#ifdef CONFIG_RISCV_SMODE + csrw sepc, a0 +#else csrw mepc, a0 +#endif +#ifdef CONFIG_RISCV_SMODE +/* + * Remain in S-mode after sret + */ + li t0, SSTATUS_SPP + csrs sstatus, t0 +#else /* * Remain in M-mode after mret */ li t0, MSTATUS_MPP csrs mstatus, t0 +#endif LREG x1, 1*REGBYTES(sp) LREG x2, 2*REGBYTES(sp) LREG x3, 3*REGBYTES(sp) @@ -279,4 +308,8 @@ trap_entry: LREG x30, 30*REGBYTES(sp) LREG x31, 31*REGBYTES(sp) addi sp, sp, 32*REGBYTES +#ifdef CONFIG_RISCV_SMODE + sret +#else mret +#endif From patchwork Tue Nov 20 11:29:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1000412 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=brainfault.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=brainfault-org.20150623.gappssmtp.com header.i=@brainfault-org.20150623.gappssmtp.com header.b="W9p7XFYd"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42zk6q2lQLz9s8F for ; Tue, 20 Nov 2018 22:31:15 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 18DB5C22012; Tue, 20 Nov 2018 11:30:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7341EC22041; Tue, 20 Nov 2018 11:30:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DB554C22035; Tue, 20 Nov 2018 11:29:59 +0000 (UTC) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by lists.denx.de (Postfix) with ESMTPS id A8A02C22038 for ; Tue, 20 Nov 2018 11:29:55 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id v1-v6so875288plo.2 for ; Tue, 20 Nov 2018 03:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=x2OyrEDzvffMsek3go7QmwY5NE6BAji11AUCfoG8qOc=; b=W9p7XFYdrJyxICZi11imqw13No3Y61xZCm8yEFlfT7fzFAwfXoVtI1rKmle4CX2kUB 7Qaj8LBln13aBM5BdQSdw4yuzdu++fBCKL5dtzgvR9QjCpSGTp80wbFkfU/AavvDjbIO ZH+EuDeOTWHHaPs29swcrZHVWxTOzvFs9o0h2l36vINZh6HK9FMR7QsFCUVpxVM4+6le 87Ee3IBwKlSVb3uArDXxueHBXvvwcHKk7YoYMdOyYezXK/NeKsYDSGU0vOF+EfRIM4ox E8etnIG6wX5uA8lLDEJyY9F7o1uig2lGV3UrCbqQhnECqxlgYkE77Km7dAVSpHMv7ck7 ms1g== 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=x2OyrEDzvffMsek3go7QmwY5NE6BAji11AUCfoG8qOc=; b=RL2lA//gXBBt9A8ySzBzdjTTMkpthtRQNj+5J9Lw+vwpCMw3Lz2iIwQJDyJ6L7Bjom f6Zg5jXnn6ee4ZvmH/Q+GdjEnGlULkL5Jhi8zf4MNPo1ryUz+1emPEmmUGupHcfbwZft LFlVM67iCTyL8w5LR5vq3iRX9hWsiPmQ/6Rt8OFvCqzX9X6CqW7XABpr8qI1PbcAYA34 ffVQpn9ZEE0gfKifF6TGQ6qbsGQGREPw29B9xR8GUkptOO1MrDC9MJmUVaQdMsFXbeVa 7BpEbJTS7SVNmVNH/z0Y1Q+WOYYizNm16Qc2DjSZrbf1tbqaDreLYMP7rRWAJslQLY72 hsCg== X-Gm-Message-State: AA+aEWYYhHPQJWdocSKIOh9OCu7bCb6vGIYsGEhRcYX2gQ4Sw+EGv5P6 oFO+1pubKs4rHbfNL6xPuBuKRA== X-Google-Smtp-Source: AFSGD/WrdP+erTiR6mRGFZhkpw7TQ4GMHMfHu/AmiFw4V9/tVyKZiWFSnl/+BH4bswUwox/eI1mnEg== X-Received: by 2002:a17:902:6185:: with SMTP id u5mr1819090plj.194.1542713394112; Tue, 20 Nov 2018 03:29:54 -0800 (PST) Received: from localhost.localdomain ([106.51.16.59]) by smtp.googlemail.com with ESMTPSA id m10-v6sm97725026pfg.180.2018.11.20.03.29.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 03:29:53 -0800 (PST) From: Anup Patel To: Rick Chen Date: Tue, 20 Nov 2018 16:59:32 +0530 Message-Id: <20181120112933.23700-3-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120112933.23700-1-anup@brainfault.org> References: <20181120112933.23700-1-anup@brainfault.org> Cc: U-Boot Mailing List , Palmer Dabbelt , Alexander Graf , Christoph Hellwig , Atish Patra Subject: [U-Boot] [PATCH v2 2/3] riscv: qemu: Use different SYS_TEXT_BASE for S-mode X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When u-boot runs in S-mode, the M-mode runtime firmware (BBL or equivalent) uses memory range in 0x80000000 to 0x80200000. Due to this, we cannot use 0x80000000 as SYS_TEXT_BASE when running in S-mode. Instead for S-mode, we use 0x80200000 as SYS_TEXT_BASE. Even Linux RISC-V kernel ignores/reserves memory range 0x80000000 to 0x80200000 because it runs in S-mode. Signed-off-by: Anup Patel Reviewed-by: Bin Meng Tested-by: Bin Meng --- board/emulation/qemu-riscv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig index 33ca253432..56bb5337d4 100644 --- a/board/emulation/qemu-riscv/Kconfig +++ b/board/emulation/qemu-riscv/Kconfig @@ -13,7 +13,8 @@ config SYS_CONFIG_NAME default "qemu-riscv" config SYS_TEXT_BASE - default 0x80000000 + default 0x80000000 if !RISCV_SMODE + default 0x80200000 if RISCV_SMODE config BOARD_SPECIFIC_OPTIONS # dummy def_bool y From patchwork Tue Nov 20 11:29:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1000413 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=brainfault.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=brainfault-org.20150623.gappssmtp.com header.i=@brainfault-org.20150623.gappssmtp.com header.b="BOop4NVd"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42zk7M3zM6z9s8F for ; Tue, 20 Nov 2018 22:31:43 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 42C20C2203B; Tue, 20 Nov 2018 11:30:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4D10FC2202A; Tue, 20 Nov 2018 11:30:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BAFF9C22020; Tue, 20 Nov 2018 11:30:05 +0000 (UTC) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by lists.denx.de (Postfix) with ESMTPS id 2CE5EC22002 for ; Tue, 20 Nov 2018 11:30:00 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id u3-v6so870415pfm.4 for ; Tue, 20 Nov 2018 03:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=014zxHp+eUYEPfaHwVWMUz93Q8iR395grP2hthoBOpc=; b=BOop4NVd+yo2rh4K5QMKu0GOoG9xrl329Fi5Lv7e7aNJ1AmbhoaGBrhLm+1QUFNUrV 45VaZscIWAYYN19iGcUWmsDZh2ycWDg4wn5ib98uM6o0e/RoR0cal4kHbPn0eUY9Q7UJ zW+JnkpT2Vwoaehlvzo5+1Nh4ykZsS2estCp1j4k/jsyIaxDJe3luLTeqNzHLl2W26Q1 txd9BHmy1zrRQILc1msZAgvBrJlwwIHIctvXvBCDdgeRClF7YYKMylaWQ7nI3Ete1/ce xajyGQOVWhScw5g2eBAuzJXfDJHoQXsMLD71BhLP7bGPfdGK2D7KydXu3RpREa2Dcb12 bsMA== 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=014zxHp+eUYEPfaHwVWMUz93Q8iR395grP2hthoBOpc=; b=C2zUrmVSA9VRJ1C535cLyGZlg28fQuiMcyYK5FyxDrPLXWwid2MkdCpm21j76KTVfj CPvWyHrxSjexf2IIibHKMcZn3mvZ4o9cG7lSIIK0l8/D2Qi+HMdM+jyeT2+d04aY/3ah te/UGjxd6PqhcNs0NwpFbcZtb/a26nNap4St+MpWDV2CPzesIEAQlrgwykG9m/pMfetq 6W44X4QuOoogQGgZ6SZxJuF10S2BXZiEoosyE2mDWfZeNTqD3wUetPUd5/tgtX27X0lD Vq5P+0e7jhK81TPUjmx7Ta8ukJMWecnA8rx6mglCfhZgEkFaYhoFJ4ppioxTyGws5sHo tGrQ== X-Gm-Message-State: AGRZ1gL2QlaKG1XgrSzNs2J/z/z9SPyFg8OD3CXIv7wg8gnQ4PJ823m/ AkKLvlQvLJwe1V7oZaro6wD4hQ== X-Google-Smtp-Source: AJdET5cTEIZG00Spu+Ov4yDew5U3QhVxMsZoMwOoSFijFdhF1+b0EZbfWaTr2ze2SupqnW8leul/FQ== X-Received: by 2002:a62:7e13:: with SMTP id z19mr1796688pfc.94.1542713398566; Tue, 20 Nov 2018 03:29:58 -0800 (PST) Received: from localhost.localdomain ([106.51.16.59]) by smtp.googlemail.com with ESMTPSA id m10-v6sm97725026pfg.180.2018.11.20.03.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 03:29:57 -0800 (PST) From: Anup Patel To: Rick Chen Date: Tue, 20 Nov 2018 16:59:33 +0530 Message-Id: <20181120112933.23700-4-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120112933.23700-1-anup@brainfault.org> References: <20181120112933.23700-1-anup@brainfault.org> Cc: U-Boot Mailing List , Palmer Dabbelt , Alexander Graf , Christoph Hellwig , Atish Patra Subject: [U-Boot] [PATCH v2 3/3] riscv: Add S-mode defconfigs for QEMU virt machine X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds S-mode defconfigs for QEMU virt machine so that we can run u-boot in S-mode on QEMU using M-mode runtime firmware (BBL or equivalent). Signed-off-by: Anup Patel Reviewed-by: Bin Meng Tested-by: Bin Meng --- configs/qemu-riscv32-smode_defconfig | 10 ++++++++++ configs/qemu-riscv64-smode_defconfig | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 configs/qemu-riscv32-smode_defconfig create mode 100644 configs/qemu-riscv64-smode_defconfig diff --git a/configs/qemu-riscv32-smode_defconfig b/configs/qemu-riscv32-smode_defconfig new file mode 100644 index 0000000000..0a84ec1874 --- /dev/null +++ b/configs/qemu-riscv32-smode_defconfig @@ -0,0 +1,10 @@ +CONFIG_RISCV=y +CONFIG_TARGET_QEMU_VIRT=y +CONFIG_RISCV_SMODE=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_FIT=y +CONFIG_DISPLAY_CPUINFO=y +CONFIG_DISPLAY_BOARDINFO=y +# CONFIG_CMD_MII is not set +CONFIG_OF_PRIOR_STAGE=y diff --git a/configs/qemu-riscv64-smode_defconfig b/configs/qemu-riscv64-smode_defconfig new file mode 100644 index 0000000000..b012443370 --- /dev/null +++ b/configs/qemu-riscv64-smode_defconfig @@ -0,0 +1,11 @@ +CONFIG_RISCV=y +CONFIG_TARGET_QEMU_VIRT=y +CONFIG_ARCH_RV64I=y +CONFIG_RISCV_SMODE=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_FIT=y +CONFIG_DISPLAY_CPUINFO=y +CONFIG_DISPLAY_BOARDINFO=y +# CONFIG_CMD_MII is not set +CONFIG_OF_PRIOR_STAGE=y