From nobody Wed Nov 12 10:09:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1570290752; cv=none; d=zoho.com; s=zohoarc; b=LO/2n60U7F796uOolL6r6hhXsia0w4a8o915Jq+c3Nb9aIoz/8rTwmvorgMsibcXEUV1iqFPxIA84UrFnhHltf2RufELgzAMvMuwOE7yjcwQPL+qL5PbFjM63R63ZPzqvHjI4UVhydRMJk9SXgP7IyY5kyAYNoVIP4LwzhCUSIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570290752; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ORpZrfjKnIUmuyqyANwDX4Q5AcwXrPMAGidRqNo+o7U=; b=bbuQp3Vk+0RTFlFPUsbxOom70JP7+szfZTdI1cNlmFsLG2WfOV8B+vciCnJqopGA+3R/Rgzm/ngezrLBraInALxaBe+K4wJreVdNyFzlh3L754xGRsNDTtAp/OF78v/zTAAoPLVyk2XlnlyKVrDOhcGPwpnm6+CFbCohoeKESTI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570290752082643.622612393533; Sat, 5 Oct 2019 08:52:32 -0700 (PDT) Received: from localhost ([::1]:57526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmM8-00041r-Ie for importer@patchew.org; Sat, 05 Oct 2019 11:52:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmHl-0008Jx-NP for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGmHj-0007y4-N9 for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:47:57 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:34349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGmHj-0007wB-FS; Sat, 05 Oct 2019 11:47:55 -0400 Received: by mail-wr1-x431.google.com with SMTP id j11so4697888wrp.1; Sat, 05 Oct 2019 08:47:54 -0700 (PDT) Received: from localhost.localdomain (46.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.46]) by smtp.gmail.com with ESMTPSA id o22sm24542294wra.96.2019.10.05.08.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 08:47:52 -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=ORpZrfjKnIUmuyqyANwDX4Q5AcwXrPMAGidRqNo+o7U=; b=RmoppEl7JNk1COfGBKgUmdTHS9PEh8t7ea+X1wyUNpc9xt0tqVa4lsbEQM5434JRKy NZ2NtRz2d4jzpv/VGPAKujLGEt2l1tnayTckP3b+hpi+c5cwomnS5HoJfpvlFRnHPnlG FsH8K5kuzhq/jC1H09GD6opyeLALoRgSCZDxPE1iZ/WQxPcp3pCGB+w9B3JbXZlGJ/w9 feB5s/GeKic1VAt2Upp7CkUUF5ugPjnercwJMFzvYTHv/NhTTpkdXPjP2eCSQEnjBwhf 9KzuFO9X6dOny4Afksaf5+2YTr94oHOtetCWF+3XlFoGeai5QpvMCPFEVcj4OeoK0YaJ PVdg== 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=ORpZrfjKnIUmuyqyANwDX4Q5AcwXrPMAGidRqNo+o7U=; b=E5F4lm3xnyqqE4EFGe22PC95TEb3MjQpZqI+q5pKZHrjMlQkMoRqbpstoAyormQiC/ p/u61jLRRq+JP9ne+7ShJpg/bq5F0eMRDYM4kIxCnTQYBy4/iW5vLCDsV6BLFSCt+8Mt 4gwYe176x6+z8zXXUgJ58n//vpD2/oJ3lOEEPt0CabQhPXJ5/MQwU4tRxQWdDNoyqzHn nQOcth6ko5AuVhzgUVVdWDnRT2SK57AnM8vVeUiHIYcaY83rZqS04Z98rCeBMNwZycbV yZucPgVDhfg17d9f5qjimxS4NdrsY5nippYEGgVbK2fFcR5gcgakyEEkzkoN+QGs3wg0 NMPw== X-Gm-Message-State: APjAAAXXiyzvUvnSN9/FW74II6gReMwTKK3Fwz4EX9EhtnTAa9o6sBAV 9apCxfnhLUZZFUKee5I8cErPmui3cGo= X-Google-Smtp-Source: APXvYqy4ZT/CTaYNixI30JDDxWWz9HhA4kc1AnS0NBgeh9UH5F8aVvdcs+itGToM1hmHUldg09x+bg== X-Received: by 2002:adf:ff8b:: with SMTP id j11mr7286784wrr.65.1570290473013; Sat, 05 Oct 2019 08:47:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/5] tests/boot_linux_console: Add initrd test for the Exynos4210 Date: Sat, 5 Oct 2019 17:47:44 +0200 Message-Id: <20191005154748.21718-2-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191005154748.21718-1-f4bug@amsat.org> References: <20191005154748.21718-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: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 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: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Basse?= , Peter Maydell , Eduardo Habkost , Evgeny Voevodin , Bartlomiej Zolnierkiewicz , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Krzysztof Kozlowski , Jean-Christophe Dubois , qemu-arm@nongnu.org, Dmitry Solodkiy , Cleber Rosa , Maksim Kozlov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Guenter Roeck Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This test boots a Linux kernel on a smdkc210 board and verify the serial output is working. The cpio image used comes from the linux-build-test project: https://github.com/groeck/linux-build-test If ARM is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:arm" tags. This test can be run using: $ avocado --show=3Dapp,console run -t machine:smdkc210 tests/acceptance/b= oot_linux_console.py console: Booting Linux on physical CPU 0x900 console: Linux version 4.19.0-6-armmp (debian-kernel@lists.debian.org) (g= cc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u1 (2019-09= -20) console: CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=3D10c5387d console: CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instru= ction cache console: OF: fdt: Machine model: Samsung smdkv310 evaluation board based = on Exynos4210 [...] console: Samsung CPU ID: 0x43210211 console: random: get_random_bytes called from start_kernel+0xa0/0x504 wit= h crng_init=3D0 console: percpu: Embedded 17 pages/cpu s39756 r8192 d21684 u69632 console: Built 1 zonelists, mobility grouping on. Total pages: 249152 console: Kernel command line: printk.time=3D0 console=3DttySAC0,115200n8 = earlyprintk random.trust_cpu=3Doff cryptomgr.notests cpuidle.off=3D1 panic= =3D-1 noreboot [...] console: L2C: platform modifies aux control register: 0x02020000 -> 0x3e4= 20001 console: L2C: platform provided aux values permit register corruption. console: L2C: DT/platform modifies aux control register: 0x02020000 -> 0x= 3e420001 console: L2C-310 erratum 769419 enabled console: L2C-310 enabling early BRESP for Cortex-A9 console: L2C-310: enabling full line of zeros but not enabled in Cortex-A9 console: L2C-310 ID prefetch enabled, offset 1 lines console: L2C-310 dynamic clock gating disabled, standby mode disabled console: L2C-310 cache controller enabled, 8 ways, 128 kB console: L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x7e420001 console: Exynos4210 clocks: sclk_apll =3D 12000000, sclk_mpll =3D 12000000 console: sclk_epll =3D 12000000, sclk_vpll =3D 12000000, arm_clk =3D 1200= 0000 [...] console: s3c-i2c 13860000.i2c: slave address 0x00 console: s3c-i2c 13860000.i2c: bus frequency set to 93 KHz console: s3c-i2c 13860000.i2c: i2c-0: S3C I2C adapter [...] console: dma-pl330 12680000.pdma: Loaded driver for PL330 DMAC-241330 console: dma-pl330 12680000.pdma: DBUFF-256x8bytes Num_Chans-8 Num_= Peri-32 Num_Events-16 console: dma-pl330 12690000.pdma: Loaded driver for PL330 DMAC-241330 console: dma-pl330 12690000.pdma: DBUFF-256x8bytes Num_Chans-8 Num_= Peri-32 Num_Events-16 console: dma-pl330 12850000.mdma: Loaded driver for PL330 DMAC-241330 console: dma-pl330 12850000.mdma: DBUFF-256x8bytes Num_Chans-8 Num_= Peri-1 Num_Events-16 console: dma-pl330 12850000.mdma: PM domain LCD0 will not be powered off console: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled console: Serial: AMBA driver console: 13800000.serial: ttySAC0 at MMIO 0x13800000 (irq =3D 40, base_ba= ud =3D 0) is a S3C6400/10 console: console [ttySAC0] enabled console: 13810000.serial: ttySAC1 at MMIO 0x13810000 (irq =3D 41, base_ba= ud =3D 0) is a S3C6400/10 console: 13820000.serial: ttySAC2 at MMIO 0x13820000 (irq =3D 42, base_ba= ud =3D 0) is a S3C6400/10 console: 13830000.serial: ttySAC3 at MMIO 0x13830000 (irq =3D 43, base_ba= ud =3D 0) is a S3C6400/10 [...] console: Freeing unused kernel memory: 2048K console: Run /init as init process console: mount: mounting devtmpfs on /dev failed: Device or resource busy console: Starting logging: OK console: Initializing random number generator... random: dd: uninitialize= d urandom read (512 bytes read) console: done. console: Starting network: OK console: Found console ttySAC0 console: Linux version 4.19.0-6-armmp (debian-kernel@lists.debian.org) (g= cc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u1 (2019-09= -20) console: Boot successful. PASS (37.98 s) Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- serial input is not working :( I sometime get (not always): Starting network: OK [ 70.403690] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: [ 70.423212] rcu: 0-...!: (36 GPs behind) idle=3Dc7a/1/0x40000000 sof= tirq=3D287/288 fqs=3D1 [ 70.428209] rcu: (detected by 1, t=3D2602 jiffies, g=3D-443, q=3D220= 9) [ 70.432826] Sending NMI from CPU 1 to CPUs 0: [ 70.473866] NMI backtrace for cpu 0 [ 70.476621] CPU: 0 PID: 112 Comm: cat Not tainted 4.19.0 #1 [ 70.476711] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 70.476916] PC is at mntput_no_expire+0x88/0x464 [ 70.476996] LR is at rcu_is_watching+0x24/0x78 [ 70.477074] pc : [] lr : [] psr: a0000013 [ 70.477150] sp : ee2afdb0 ip : 9dff9a2f fp : ee2aff70 [ 70.477225] r10: 00000142 r9 : ee219dc0 r8 : ee2afec0 [ 70.477302] r7 : ee2afec0 r6 : c0298d6c r5 : ef02c400 r4 : ef018200 [ 70.477385] r3 : c0f99274 r2 : 00000031 r1 : 2e87c000 r0 : a0000013 [ 70.477461] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment= none [ 70.477537] Control: 10c5387d Table: 6e30806a DAC: 00000051 [ 70.477613] CPU: 0 PID: 112 Comm: cat Not tainted 4.19.0 #1 [ 70.477688] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 70.477765] [] (unwind_backtrace) from [] (show_stac= k+0x10/0x14) [ 70.477847] [] (show_stack) from [] (dump_stack+0x98= /0xc4) [ 70.477925] [] (dump_stack) from [] (nmi_cpu_backtra= ce+0x6c/0xb4) [ 70.478000] [] (nmi_cpu_backtrace) from [] (handle_I= PI+0x108/0x420) [ 70.478076] [] (handle_IPI) from [] (gic_handle_irq+= 0x98/0x9c) [ 70.478151] [] (gic_handle_irq) from [] (__irq_svc+0= x70/0xb0) [ 70.478226] Exception stack(0xee2afd60 to 0xee2afda8) [ 70.478303] fd60: a0000013 2e87c000 00000031 c0f99274 ef018200 ef02c400 = c0298d6c ee2afec0 [ 70.478378] fd80: ee2afec0 ee219dc0 00000142 ee2aff70 9dff9a2f ee2afdb0 = c01a2fb4 c02b256c [ 70.478453] fda0: a0000013 ffffffff [ 70.478529] [] (__irq_svc) from [] (mntput_no_expire= +0x88/0x464) [ 70.478605] [] (mntput_no_expire) from [] (terminate= _walk+0x154/0x160) [ 70.478681] [] (terminate_walk) from [] (path_openat= +0x324/0xfe4) [ 70.478759] [] (path_openat) from [] (do_filp_open+0= x70/0xdc) [ 70.478835] [] (do_filp_open) from [] (do_sys_open+0= x134/0x1e4) [ 70.478911] [] (do_sys_open) from [] (ret_fast_sysca= ll+0x0/0x28) [ 70.478989] Exception stack(0xee2affa8 to 0xee2afff0) [ 70.479064] ffa0: b6fc7d6c 0000000a ffffff9c bebbf268 = 000a0000 00000000 [ 70.479139] ffc0: b6fc7d6c 0000000a 00000050 00000142 bebbf268 b6fc6970 = b6fc6b28 bebbf254 [ 70.479214] ffe0: b6fc6970 bebbf1e0 b6f9dd94 b6fb0c0c [ 70.484892] rcu: rcu_preempt kthread starved for 2600 jiffies! g-443 f0x= 0 RCU_GP_WAIT_FQS(5) ->state=3D0x402 ->cpu=3D0 [ 70.514943] rcu: RCU grace-period kthread stack dump: [ 70.516687] rcu_preempt I 0 10 2 0x00000000 [ 70.523711] [] (__schedule) from [] (schedule+0x4c/0= xac) [ 70.525103] [] (schedule) from [] (schedule_timeout+= 0x230/0x564) [ 70.526472] [] (schedule_timeout) from [] (rcu_gp_kt= hread+0x6e4/0xbf0) [ 70.527784] [] (rcu_gp_kthread) from [] (kthread+0x1= 38/0x168) [ 70.528989] [] (kthread) from [] (ret_from_fork+0x14= /0x20) [ 70.530387] Exception stack(0xef111fb0 to 0xef111ff8) [ 70.532556] 1fa0: 00000000 00000000 = 00000000 00000000 [ 70.534904] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 = 00000000 00000000 [ 70.536920] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Found console ttySAC0 Linux version 4.19.0 (root@591d0a36fd03) (gcc version 6.3.0 20170516 (Debia= n 6.3.0-18)) #1 SMP PREEMPT Fri Oct 4 19:53:43 UTC 2019 Boot successful. / # Also: [ 73.000405] [] (unwind_backtrace) from [] (show_stac= k+0x10/0x14) [ 73.000537] [] (show_stack) from [] (dump_stack+0x98= /0xc4) [ 73.000631] [] (dump_stack) from [] (nmi_cpu_backtra= ce+0x6c/0xb4) [ 73.000701] [] (nmi_cpu_backtrace) from [] (handle_I= PI+0x108/0x420) [ 73.000823] [] (handle_IPI) from [] (gic_handle_irq+= 0x98/0x9c) [ 73.000924] [] (gic_handle_irq) from [] (__irq_svc+0= x70/0xb0) [ 73.000990] Exception stack(0xef123f80 to 0xef123fc8) [ 73.001064] 3f80: 00000001 00000001 00000000 ef11b300 ef122000 c1007470 = c10074b4 00000002 [ 73.001131] 3fa0: 4000406a 410fc090 00000000 00000000 00000000 ef123fd0 = c018759c c010a4c8 [ 73.001196] 3fc0: 20000013 ffffffff [ 73.001262] [] (__irq_svc) from [] (arch_cpu_idle+0x= 24/0x3c) [ 73.001328] [] (arch_cpu_idle) from [] (do_idle+0xcc= /0x168) [ 73.001394] [] (do_idle) from [] (cpu_startup_entry+= 0x18/0x1c) [ 73.001462] [] (cpu_startup_entry) from [<4010276c>] (0x401027= 6c) Based-on: 20190926173428.10713-16-f4bug@amsat.org "tests/boot_linux_console: Extract the gunzip() helper" --- tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 079590f0c8..197358a69c 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -318,6 +318,47 @@ class BootLinuxConsole(Test): self.vm.launch() self.wait_for_console_pattern('init started: BusyBox') =20 + def test_arm_exynos4210_initrd(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:smdkc210 + """ + deb_url =3D ('https://snapshot.debian.org/archive/debian/' + '20190928T224601Z/pool/main/l/linux/' + 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb= ') + deb_hash =3D 'fa9df4a0d38936cb50084838f2cb933f570d7d82' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.19.0-6-armmp') + dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv= 310.dtb' + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + + initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv5.cpio.gz') + initrd_hash =3D '2b50f1873e113523967806f4da2afe385462ff9b' + initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) + initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') + gunzip(initrd_path_gz, initrd_path) + + self.vm.set_machine('smdkc210') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dexynos4210,0x13800000 earlyprin= tk ' + + 'console=3DttySAC0,115200n8 ' + + 'random.trust_cpu=3Doff cryptomgr.notests '= + + 'cpuidle.off=3D1 panic=3D-1 noreboot') + + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + + self.wait_for_console_pattern('Boot successful.') + # TODO user command, for now the uart is stuck + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.20.1 From nobody Wed Nov 12 10:09:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1570290601; cv=none; d=zoho.com; s=zohoarc; b=MzNQzFPvyt2rWXRaq4fTzjzfWSYIHhNXAIym/CHFF5wW1qtzxkezrIhkWIy1KCyP9bWXFI4kx4EwMogJj0flwfCRTNnZhiWnMYZu8PIYlMZZFAI7xNUYHSJTPeHGArHUTbMc7Ll0yMfPzz6JOS+QRruc7eplUXDsWmdD1mj6kpU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570290601; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=x7aN04x8oQId+qYbRq/uf3XYmeFkyrCLW6hBSepKaf4=; b=hVr9QHKHyi2E9emnLHA6aL1ZAFtApG7Uz5Uo/YY4a2tANb6wbQkC9iVEytSzZA1Um649n1ZS6NUQTltj0CRh/y7jkceu27iJPo2nrGUZWWbtUW7wfHT5ArRQ+7udUPOh1hnmIl7+mTYS9qExQkRZQ9RY2eEC+ulZPQezqkLnY8Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570290601021910.9423820384209; Sat, 5 Oct 2019 08:50:01 -0700 (PDT) Received: from localhost ([::1]:57502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmJh-0001X7-DL for importer@patchew.org; Sat, 05 Oct 2019 11:49:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46554) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmHm-0008Jy-94 for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:47:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGmHl-0007yO-CX for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:47:58 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:36861) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGmHj-0007xJ-Mu; Sat, 05 Oct 2019 11:47:55 -0400 Received: by mail-wm1-x341.google.com with SMTP id m18so8508046wmc.1; Sat, 05 Oct 2019 08:47:55 -0700 (PDT) Received: from localhost.localdomain (46.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.46]) by smtp.gmail.com with ESMTPSA id o22sm24542294wra.96.2019.10.05.08.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 08:47:53 -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=x7aN04x8oQId+qYbRq/uf3XYmeFkyrCLW6hBSepKaf4=; b=hexhCZg6tJ9CiWyczT9P2o+wWILPANwGhS8LPCAyCnJcbTFNv9xNd4JrHMnfbR9wnT qWFXXoaOV4ywP0m40pKhNMphaDcICHpel/pSzNqO0pzdCn87CAXyN8eN7hM2sFnUH71s pHFf3szAo3mKlWMH8mIDs2SrLCAxGEq1iNcFeGxV+TG+RQwcKs1a8Y7gzWoZHh6Z6WMg u//pMv/MQGs3JTI2bDd5YurJxJbIHG4xUfI1n5/zHvkUrKCEeuxDnob7wVddPK+kDpxQ VVaRFGF/vuq07rqie0OkWgcFJq13OIB+5aZiXXI36h9UFHe+NYsy0CwgGbjhMYr6J4NB nwjg== 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=x7aN04x8oQId+qYbRq/uf3XYmeFkyrCLW6hBSepKaf4=; b=c+m9FDj4uJ/9TRq8q72AGjosHMNAQr4bQQesxVj3zbqBphAEGRKJhFZj5sbkSqQPMT 77j0tPKfvU8xnNaovKHxt7sHG/h2KJf71s1kEAlF4+SMJy25vG8LhIXHO9BGatWcxXnD 24nJEUpbk0/q8v91YrsytZ5oqvAoP4kZSCSoyWijDNwEDAOnkTnuLQTGPOAx8JHmaXng TZ10wi/Y2KXSYvu66HA7tbOrRgu2/OihTNeJwuF+hTD3zSBTBA1xnUp+R/h9g8V7NrGS ver8bYHAoKptCyZU1eMSmE1S4MdN4qmQ9shb0ZQJpEg02yaH66bbsvLceAJRL6W2wX/k SuVw== X-Gm-Message-State: APjAAAUr06bPTZIs+10rjEzNKxam1cEEPJMA0unHgg8V95QSc9ZVsEPk 8xx7nd4DXCvXqHd0cRGkkfSR3kX1wao= X-Google-Smtp-Source: APXvYqyRaWAxrOfO0iS31NavVGgKGLTPWWaaLl+yJMyWWrr1PzNH5lfWzAKBVH0k1Iv5/zuH5UVcOA== X-Received: by 2002:a1c:7902:: with SMTP id l2mr14509436wme.55.1570290474543; Sat, 05 Oct 2019 08:47:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/5] hw/sd/sdhci: Add a comment to distinct the i.MX eSDHC functions Date: Sat, 5 Oct 2019 17:47:45 +0200 Message-Id: <20191005154748.21718-3-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191005154748.21718-1-f4bug@amsat.org> References: <20191005154748.21718-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: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Basse?= , Peter Maydell , Eduardo Habkost , Evgeny Voevodin , Bartlomiej Zolnierkiewicz , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Krzysztof Kozlowski , Jean-Christophe Dubois , qemu-arm@nongnu.org, Dmitry Solodkiy , Cleber Rosa , Maksim Kozlov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Guenter Roeck Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This file keeps the various QDev blocks separated by comments. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa --- hw/sd/sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index e08ec3e398..82ec5c1b4a 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -1532,6 +1532,8 @@ static const TypeInfo sdhci_bus_info =3D { .class_init =3D sdhci_bus_class_init, }; =20 +/* --- qdev i.MX eSDHC --- */ + static uint64_t usdhc_read(void *opaque, hwaddr offset, unsigned size) { SDHCIState *s =3D SYSBUS_SDHCI(opaque); @@ -1734,7 +1736,6 @@ usdhc_write(void *opaque, hwaddr offset, uint64_t val= , unsigned size) } } =20 - static const MemoryRegionOps usdhc_mmio_ops =3D { .read =3D usdhc_read, .write =3D usdhc_write, --=20 2.20.1 From nobody Wed Nov 12 10:09:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1570290608; cv=none; d=zoho.com; s=zohoarc; b=JzVDhJiDwjKUbYG4vycgl/WlMqwZoHCSfBnIJMKUXIARSiND5BLeCqP+yYERf+Ef6c6o3P5jK/B52tp9jyebTReHd9qFRMxTpVXY1ZJz+V869x2Usmsy+QeFXJOMzRfl9QRYMnWICLTQdnUkWsf2N4wQo0uYp6oGUh8VVAJ6mL4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570290608; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=cNN3zQlFhxT6iWGCrzkAdnUP+7NnUIzpyS9EQoIRQR4=; b=iueyeJJRlrFpkDK6A/0834zFXzvkili30G0Fys6fOv9+viYzBqV5egRQop7/sL4BkpDTPNVsOrJnKYG98LanazIEoidlInjGhIURuZOFriW5S+3fjWgAD43aEKINTzKUdkXTSa1chQJvLcr/Cdo+TWyl0nUxe2PXky27DxIhb4k= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570290608303366.40323135357517; Sat, 5 Oct 2019 08:50:08 -0700 (PDT) Received: from localhost ([::1]:57504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmJq-0001mJ-ML for importer@patchew.org; Sat, 05 Oct 2019 11:50:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46568) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmHn-0008K3-9L for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGmHl-0007ya-MM for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:47:59 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGmHl-0007yF-Cv; Sat, 05 Oct 2019 11:47:57 -0400 Received: by mail-wr1-x441.google.com with SMTP id j18so9666661wrq.10; Sat, 05 Oct 2019 08:47:57 -0700 (PDT) Received: from localhost.localdomain (46.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.46]) by smtp.gmail.com with ESMTPSA id o22sm24542294wra.96.2019.10.05.08.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 08:47:55 -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=cNN3zQlFhxT6iWGCrzkAdnUP+7NnUIzpyS9EQoIRQR4=; b=JqbRLn/SSsx3jDPMksphf3Pr+g5XNUQeJ1HfM1cAu4jOb5wg3788xC6s7NUuNTg7Hm DYhCjvtvVKBPAo78V5UkM/x3bi1V8IspkdkNV7bp2XXFJiv4yiaB0JaqYN535CELxpHZ CnR/ifhhEBQZj8um1FC58jE2M+JCnM67HMKizsc7CXt7xBylcpARsDEW6Cnwrd95NXoA 0m0hlB/tZjwDPNVsWJaPf1esu9yJfIwCD8D20l3LRLRm6/uOw9fEm3KcbSibVyJIQQsB B4UwXrowNli4IVbMJlhJ9OnrLqAHjaMTDpAd/Hs8q+98yPfDwnvQjvfCcLOBYrY7TvYi JqgQ== 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=cNN3zQlFhxT6iWGCrzkAdnUP+7NnUIzpyS9EQoIRQR4=; b=tvQnoD/rSZCw7I5O6AIOCO6F5d5e4az1qhQsU9VLtsfgA2q83zHcNniGLU86DGIbHK QpGRdDqu723Z20gbTirE0oKmNn14jWpnnIGHm4950sOc+4myLSQ3/V4d4lYRrIltjgvl W207NRBvw5/uJUvQBiOwcLx73HIJ10eyzhJXUYpg1NkPVc5fcVDD+RutDJ/YEy+QKYS+ 5NgPd8Ten+YDBV8IX6/4E5usDPe/p0dSc2XYY0kufPWUeM6nxdvQ0ub6fuQrZsU5c1ZX z6hKFk2sxbvUvmu8iMqsVfmiQbUFmbfie3CfHoa1alq8afA4XQMJTjHeQC35wRuC+jKy Q00A== X-Gm-Message-State: APjAAAU63EdQlzfAWPqpxyOuhHBK5QGn+5tXdsFf9pmSuFw+rwFcxPlS K/bQ2EjF1FfCfcgt0m3eqot44Xwum3s= X-Google-Smtp-Source: APXvYqzSG5PGCSenCjwNYiwzqbh2B1823YqpSd3zAXjT6SFJYjqgT2t+TuVG2lPsayAoiv9IrziCWA== X-Received: by 2002:adf:afed:: with SMTP id y45mr15778527wrd.347.1570290475969; Sat, 05 Oct 2019 08:47:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/5] hw/sd/sdhci: Add dummy Samsung SDHCI controller Date: Sat, 5 Oct 2019 17:47:46 +0200 Message-Id: <20191005154748.21718-4-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191005154748.21718-1-f4bug@amsat.org> References: <20191005154748.21718-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: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Basse?= , Peter Maydell , Eduardo Habkost , Evgeny Voevodin , Bartlomiej Zolnierkiewicz , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Krzysztof Kozlowski , Jean-Christophe Dubois , qemu-arm@nongnu.org, Dmitry Solodkiy , Cleber Rosa , Maksim Kozlov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Guenter Roeck Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The Linux kernel access few S3C-specific registers [1] to set some clock. We don't care about this part for device emulation [2]. Add a dummy device to properly ignore these accesses, so we can focus on the important registers missing. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /drivers/mmc/host/sdhci-s3c-regs.h?h=3Dcc014f3 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /drivers/mmc/host/sdhci-s3c.c?h=3Dv5.3#n263 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Krzysztof Kozlowski --- Eventually we should add the ADMA changes Igor sent in this patch: https://patchwork.ozlabs.org/patch/181854/ They might solve the boot timing issues when using SD cards. --- hw/sd/sdhci.c | 65 +++++++++++++++++++++++++++++++++++++++++++ include/hw/sd/sdhci.h | 2 ++ 2 files changed, 67 insertions(+) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 82ec5c1b4a..88404d0e9d 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -1761,11 +1761,76 @@ static const TypeInfo imx_usdhc_info =3D { .instance_init =3D imx_usdhc_init, }; =20 +/* --- qdev Samsung s3c --- */ + +#define S3C_SDHCI_CONTROL2 0x80 +#define S3C_SDHCI_CONTROL3 0x84 +#define S3C_SDHCI_CONTROL4 0x8c + +static uint64_t sdhci_s3c_read(void *opaque, hwaddr offset, unsigned size) +{ + uint64_t ret; + + switch (offset) { + case S3C_SDHCI_CONTROL2: + case S3C_SDHCI_CONTROL3: + case S3C_SDHCI_CONTROL4: + /* ignore */ + ret =3D 0; + break; + default: + ret =3D sdhci_read(opaque, offset, size); + break; + } + + return ret; +} + +static void sdhci_s3c_write(void *opaque, hwaddr offset, uint64_t val, + unsigned size) +{ + switch (offset) { + case S3C_SDHCI_CONTROL2: + case S3C_SDHCI_CONTROL3: + case S3C_SDHCI_CONTROL4: + /* ignore */ + break; + default: + sdhci_write(opaque, offset, val, size); + break; + } +} + +static const MemoryRegionOps sdhci_s3c_mmio_ops =3D { + .read =3D sdhci_s3c_read, + .write =3D sdhci_s3c_write, + .valid =3D { + .min_access_size =3D 1, + .max_access_size =3D 4, + .unaligned =3D false + }, + .endianness =3D DEVICE_LITTLE_ENDIAN, +}; + +static void sdhci_s3c_init(Object *obj) +{ + SDHCIState *s =3D SYSBUS_SDHCI(obj); + + s->io_ops =3D &sdhci_s3c_mmio_ops; +} + +static const TypeInfo sdhci_s3c_info =3D { + .name =3D TYPE_S3C_SDHCI , + .parent =3D TYPE_SYSBUS_SDHCI, + .instance_init =3D sdhci_s3c_init, +}; + static void sdhci_register_types(void) { type_register_static(&sdhci_sysbus_info); type_register_static(&sdhci_bus_info); type_register_static(&imx_usdhc_info); + type_register_static(&sdhci_s3c_info); } =20 type_init(sdhci_register_types) diff --git a/include/hw/sd/sdhci.h b/include/hw/sd/sdhci.h index cbf415e43a..c6868c9699 100644 --- a/include/hw/sd/sdhci.h +++ b/include/hw/sd/sdhci.h @@ -116,4 +116,6 @@ typedef struct SDHCIState { =20 #define TYPE_IMX_USDHC "imx-usdhc" =20 +#define TYPE_S3C_SDHCI "s3c-sdhci" + #endif /* SDHCI_H */ --=20 2.20.1 From nobody Wed Nov 12 10:09:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1570290750; cv=none; d=zoho.com; s=zohoarc; b=kOZYYS21uRGYNwJOKLFYJc7o0oKqBgTr56nYlHsn6qQB72w60ph3smL0cRZ1zEUu8s251RTyzwqVY3a/dO+drvkIW6zu0GEeMFluaRMKBztcarB7IKFrAgYd8pjRNc5ScYj1ghPZyZJZoPNTgHktXUsf5Y34xGRX7zxkoyU5RzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570290750; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=dTLpadbDkv5ZbECq3hhQLZXW2FlV9PLUwUKPlrgWr+I=; b=Zy0PweEGZwJD+i/t2xDQr6HN4hXROlUYR8EE4COtQvH0bmQvA/+KTTOxQ8rErLQmlFWAt3aVxfsfZg9zVq0KZFeyySaI7vNCTnb2LhmoItlrrepiyNOOw40z1vgsmA9I6Ehcn7GoaDvJIiHxRNu0m8iXcoNw5/X8T48DBfhQoE0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157029075017980.63735703776217; Sat, 5 Oct 2019 08:52:30 -0700 (PDT) Received: from localhost ([::1]:57524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmM6-000405-Jv for importer@patchew.org; Sat, 05 Oct 2019 11:52:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46596) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmHo-0008KJ-Pv for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:48:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGmHn-0007zT-IW for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:48:00 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:53529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGmHn-0007z2-C6; Sat, 05 Oct 2019 11:47:59 -0400 Received: by mail-wm1-x341.google.com with SMTP id i16so8509789wmd.3; Sat, 05 Oct 2019 08:47:59 -0700 (PDT) Received: from localhost.localdomain (46.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.46]) by smtp.gmail.com with ESMTPSA id o22sm24542294wra.96.2019.10.05.08.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 08:47:57 -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=dTLpadbDkv5ZbECq3hhQLZXW2FlV9PLUwUKPlrgWr+I=; b=GPCTy0gw951EGOqZEvDUJw2NKt1hzuZWalF45US8vgcteH99p39RsYLLuR8wGh+uyS 25fdx10MGXMJVzoBr+wUJ5MyH9UtIEf33mDVy+LN6gpr2UJzm/6Mj3fayYj6rCtGWl7x 0r8qkK6wlWGW6dFY8UREkdaKT/Q8mXeIy2lDLGEUxcrkwMaiz492hV+IGsJpQ4kZWNDA /IEgooFRoQSmzXC6lBYDYqjy2ff6s981VaY+ZcSN7CnhfBgVGs5o+UqSwPp30OjUFIt5 ttrZz6lAsIkI5HKGkIeqAnJY920bUnRc4y8eH+GEbxJv/FUn9sbEXCngWrRsBuGu6+19 RRqw== 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=dTLpadbDkv5ZbECq3hhQLZXW2FlV9PLUwUKPlrgWr+I=; b=X+Cg/nYg+MsicUo+PSS8wpT4LHEYrSZtSRZCW3FZbJUklMdKNqR4o1Q46r6x1N6WK9 WznMEXmyGOoUYtfZ0u5KFq8OrrRV9ecHR9/om1zFI9mNmlVbvIS+ShIzDEi9ZbcV2MX+ fTQ2+RrYtMuzRZxtrT+3WdOTEl7Q3lvUJxXeA6NKeaKngq4oZtK58ggFPBBpd/jtxzWH dhhg/RmyhyXrXq95i4SMNIOi8xt0/jR0cBpRNOH8FapK000tmqA+BT1Cu4nKk+Hp8i9G K1+fllT3OI/vbKnsoz4EG0IkFQS3Q2pQUztn7eQJk/OH7QdICEoD1mWDJ1+BCOhHLjue zF+A== X-Gm-Message-State: APjAAAVu/jZ/zwc+eG2EWU+DUXWj5hwoJ4W7JH5zTO87S8fYY4/N8CiD BOIH30vooSi67yZc/+QcdqBfzPSX+Hg= X-Google-Smtp-Source: APXvYqzIEHJ/hg5ePThlp3SzPvMweoStrrxOCdkcpTRsFG8gKWh3Duxft2nsK4KX11CaN69emW+kYQ== X-Received: by 2002:a1c:a8d8:: with SMTP id r207mr14153461wme.135.1570290478218; Sat, 05 Oct 2019 08:47:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/5] hw/arm/exynos4210: Use the Samsung s3c SDHCI controller Date: Sat, 5 Oct 2019 17:47:47 +0200 Message-Id: <20191005154748.21718-5-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191005154748.21718-1-f4bug@amsat.org> References: <20191005154748.21718-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: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Basse?= , Peter Maydell , Eduardo Habkost , Evgeny Voevodin , Bartlomiej Zolnierkiewicz , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Krzysztof Kozlowski , Jean-Christophe Dubois , qemu-arm@nongnu.org, Dmitry Solodkiy , Cleber Rosa , Maksim Kozlov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Guenter Roeck Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The Exynos SoC has specific SDHCI registers. Use the s3c SDHCI model which handle these specific registers. This silents the following "SDHC ... not implemented" warnings so we can focus on the important registers missing: $ qemu-system-arm ... -d unimp \ -append "... root=3D/dev/mmcblk0 rootfstype=3Dext4 rw rootwait" \ -drive file=3Dlinux-build-test/rootfs/arm/rootfs-armv5.ext2,if=3Dsd,for= mat=3Draw [...] [ 25.744858] sdhci: Secure Digital Host Controller Interface driver [ 25.745862] sdhci: Copyright(c) Pierre Ossman [ 25.783188] s3c-sdhci 12530000.sdhci: clock source 2: mmc_busclk.2 (12= 000000 Hz) SDHC rd_4b @0x80 not implemented SDHC wr_4b @0x80 <- 0x00000020 not implemented SDHC wr_4b @0x8c <- 0x00030000 not implemented SDHC rd_4b @0x80 not implemented SDHC wr_4b @0x80 <- 0xc0004100 not implemented SDHC wr_4b @0x84 <- 0x80808080 not implemented [ 26.013318] mmc0: SDHCI controller on samsung-hsmmc [12530000.sdhci] u= sing ADMA [ 26.032318] Synopsys Designware Multimedia Card Interface Driver [ 42.024885] Waiting for root device /dev/mmcblk0... Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Krzysztof Kozlowski --- hw/arm/exynos4210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index a9f8a5c868..77fbe1baab 100644 --- a/hw/arm/exynos4210.c +++ b/hw/arm/exynos4210.c @@ -405,7 +405,7 @@ static void exynos4210_realize(DeviceState *socdev, Err= or **errp) * public datasheet which is very similar (implementing * MMC Specification Version 4.0 being the only difference noted) */ - dev =3D qdev_create(NULL, TYPE_SYSBUS_SDHCI); + dev =3D qdev_create(NULL, TYPE_S3C_SDHCI); qdev_prop_set_uint64(dev, "capareg", EXYNOS4210_SDHCI_CAPABILITIES= ); qdev_init_nofail(dev); =20 --=20 2.20.1 From nobody Wed Nov 12 10:09:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1570290831; cv=none; d=zoho.com; s=zohoarc; b=UXET0xzK3Uw74yRz9pFo71y6ZBRghWbjnn3NFYQAwNnbRx4GvUEOTAzzcyBEENnblu3Mx/wQSrl8ujITOfFz/JLqeOP12rpBVrK2tkq7tJGLxliYIjQnKh5RdzIsIRs558SgK79t35cdPc99pJGNIZms109ZcOhDE5EIBEJoPwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570290831; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=hXjDLUOk17jtBgjZt49xK2ZebEtJ7ImDjgQZ+Uu6f2U=; b=I6JQTxVqs0/ncTYRKvkh05QBvSEDN7+tsByPfdxs1DmoPm6xfqDumNFp7kyapsjd7bGVFH+DF8oYpdgW6fIZvVOYe6uBWEF7hiAPS/5hKl2X2YA3NGmoGSVCCrD/t3WYnLFmXTmbuAlGKnjs28iHamo502NHk1afwuvFAZ8HABY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570290831050113.50655388246355; Sat, 5 Oct 2019 08:53:51 -0700 (PDT) Received: from localhost ([::1]:57550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmNR-0005bl-Q1 for importer@patchew.org; Sat, 05 Oct 2019 11:53:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46643) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGmHs-0008LC-E4 for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:48:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGmHp-00080U-Nt for qemu-devel@nongnu.org; Sat, 05 Oct 2019 11:48:04 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:33268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGmHp-0007zj-BQ; Sat, 05 Oct 2019 11:48:01 -0400 Received: by mail-wm1-x343.google.com with SMTP id r17so11681578wme.0; Sat, 05 Oct 2019 08:48:01 -0700 (PDT) Received: from localhost.localdomain (46.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.46]) by smtp.gmail.com with ESMTPSA id o22sm24542294wra.96.2019.10.05.08.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 08:47:59 -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=hXjDLUOk17jtBgjZt49xK2ZebEtJ7ImDjgQZ+Uu6f2U=; b=Tzj4FmPu/HaKqj1qTdbL/WkHveMBafQ4JPLjObEOxEwfEYGnhONmkYv9im6jjsMyFj /AEyEsRFCK9AXKWYkLdacrE2/U2I1ko2Hr/5RsX1qg40ki5u1K7IJyu3t3rzx535fCqT 3BGp+fcMUcuU7CJ5SKLNFe30tSJyv3ipcSTvvPz8W+NhIhnGZoPmRmkNn03Em2rDyeoP x3csxmMkvDIIbRkBeIyJQwKbD/zPSxZdJIDL0CI7dFhJvkk+b9pUYa2x/hd5C7/6k76f hUKf4us1EBTj/7suHuPkaJKhJCUXgyu/+vX/cu2tkDTS0zozu3C0ebiqJc6pTqHelKxb Yg8g== 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=hXjDLUOk17jtBgjZt49xK2ZebEtJ7ImDjgQZ+Uu6f2U=; b=G5mxH3D/lzVHYtALZUOqnNC6UM19zBwYn1a2mNVu21r1DalFb5yLH+BwCz62kwhxQG OJIktzHnqRrJ+DAm/+hK/jL9tXTPvnG91hp1HSGcoy85LRqaoCAtGkSlEpyr2ho8tjBg B3ayqnV5ka0y6viB2BW7qsYZJ6Lv6qyN1EIqC98FnGzaeTciCDLH145Hhp9k9CfrUbma j3NbOZFfNiMvEbdkejDhRIkU6bKKUh1nUaKEWfhxZJtIC04GaFgJtU1zDUaEDJCps7oT SUJ/RMXywNrTHouotXHkTR+k2oFe+3bIZMKecuXsk84kNw72MzayJwQ4Ub9wVTTByKnL UPXQ== X-Gm-Message-State: APjAAAVEMZT/Qo1UEMEQY3MMbzoaQFlxKu2h8zxpHjXVwy9EjuQXFj0y bMGNkRFpj31NALcIP6yHIczEydTdy4U= X-Google-Smtp-Source: APXvYqzXnigEyEQXruScyjwRCXZTJ6NIQEAVqNa1tLooPc+pS6Ui3yHk+9z27HXny3gEIia/zptGCQ== X-Received: by 2002:a1c:7306:: with SMTP id d6mr11950366wmb.62.1570290479745; Sat, 05 Oct 2019 08:47:59 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 5/5] tests/boot_linux_console: Add sdcard test for the Exynos4210 Date: Sat, 5 Oct 2019 17:47:48 +0200 Message-Id: <20191005154748.21718-6-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191005154748.21718-1-f4bug@amsat.org> References: <20191005154748.21718-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: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 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: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Basse?= , Peter Maydell , Eduardo Habkost , Evgeny Voevodin , Bartlomiej Zolnierkiewicz , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Krzysztof Kozlowski , Jean-Christophe Dubois , qemu-arm@nongnu.org, Dmitry Solodkiy , Cleber Rosa , Maksim Kozlov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Guenter Roeck Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This test boots a Linux kernel on a smdkc210 board and verify the serial output is working. The cpio image used comes from the linux-build-test project: https://github.com/groeck/linux-build-test Since this test is not reliable due to clock timing issues, it is disabled with the 'skip' property. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 197358a69c..2d0d82b013 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -14,6 +14,7 @@ import lzma import gzip import shutil =20 +from avocado import skip from avocado_qemu import Test from avocado.utils import process from avocado.utils import archive @@ -359,6 +360,52 @@ class BootLinuxConsole(Test): self.wait_for_console_pattern('Boot successful.') # TODO user command, for now the uart is stuck =20 + @skip("unstable clock timings") + def test_arm_exynos4210_sdcard(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:smdkc210 + """ + deb_url =3D ('https://snapshot.debian.org/archive/debian/' + '20190928T224601Z/pool/main/l/linux/' + 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb= ') + deb_hash =3D 'fa9df4a0d38936cb50084838f2cb933f570d7d82' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.19.0-6-armmp') + dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv= 310.dtb' + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + + rootfs_url =3D ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv5.ext2.gz') + rootfs_hash =3D '093e89d2b4d982234bf528bc9fb2f2f17a9d1f93' + rootfs_path_gz =3D self.fetch_asset(rootfs_url, asset_hash=3Drootf= s_hash) + rootfs_path =3D os.path.join(self.workdir, 'rootfs.ext2') + gunzip(rootfs_path_gz, rootfs_path) + + self.vm.set_machine('smdkc210') + self.vm.set_console(console_id=3D1) + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dexynos4210,0x13810000 earlyprin= tk ' + + 'console=3DttySAC1,115200n8 ' + + 'random.trust_cpu=3Doff cryptomgr.notests '= + + 'root=3D/dev/mmcblk0 rootwait rw ' + + 'cpuidle.off=3D1 panic=3D-1 noreboot') + + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line, + # The external MMC is on the 3rd slot + '-drive', 'if=3Dsd,driver=3Dnull-co', + '-drive', 'if=3Dsd,driver=3Dnull-co', + '-drive', 'if=3Dsd,file=3D' + rootfs_path + ',for= mat=3Draw', + '-no-reboot') + self.vm.launch() + + self.wait_for_console_pattern('Boot successful.') + # TODO user command, for now the uart is stuck + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.20.1