From patchwork Thu Dec 29 15:23:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 637559 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2984120pvb; Thu, 29 Dec 2022 07:24:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXu/8cdxtTA4vvZJq1RD7+wYcIJwtdG/nv0uLus/1YXGbgB8cphNeYZz8oUD+pbVBEIzoRTV X-Received: by 2002:ac8:5306:0:b0:3a9:8d4c:3e4c with SMTP id t6-20020ac85306000000b003a98d4c3e4cmr37201471qtn.2.1672327494974; Thu, 29 Dec 2022 07:24:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672327494; cv=none; d=google.com; s=arc-20160816; b=vLGebhyLSxCiCc8K9ZgFcN+s4/++bA8ploPxMVOFO/ONqHO56WOYqrWeldKoZVMHnZ 09wrq3QY4drcriD4/VLEedBOjnC4Yfb1d3sGIvHETFDQiWEAVtk9VLxGPssbsKFcQ91z 4Q6Spl/zyW6jtJZX2NiOmVnijTxyH8N99D/HcdTQwFeXPwIONNXoFEJO+8rLXG4Pc52u exPzcqciK3DJWz7bk0SNClnJY/3Q2ZTTx3fAnKgeXY2b64odmkAdA2lCFLxecKHvXdDe HDD5rVo+BYGs1ErPmP/va23dRtnb2zBnipQejzrI0A04THc0i60KDNbIXpwUhwGHpW5I z8lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=QJga/ZgW/BZLuSjOrg65Qd9hnGWRDub8ZZsHqX5Js1Y=; b=y+mIQ7hVdWRWUcJvxUYDigiZcKsdKPnx2o10qt1vmjoeaBtiOwHSjSL3V5YkO0PjTY sVttyA52cJKiT5vMvAZ1eI+FSi0wqG2mmzhEfUOPDJCtcJPIdwkoQBGDFntp8hy/60rr xJds6Yc1R5Lsw8fgtqeLUsYlhXc2/B4LWTRVVD/nWQxS/6x82R4Cho6JmzhBUNP5pqL0 mhvt145NLwEYURk5H+JXgqzhCr2xXml2p5xd+HZ/iW7INWdCXrJoNVwTZiGFZ/Xmktlq vloqcxoGDpX97GbGf4+W4qGVExuqCPKq0lSI1YNehmjUHTmM6hkhvW/SfcBc2VOM56ZE 9ZrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S5yLeBiw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fa9-20020a05622a4cc900b0039b1572a49bsi8804985qtb.214.2022.12.29.07.24.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Dec 2022 07:24:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S5yLeBiw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAukn-00019G-Ol; Thu, 29 Dec 2022 10:23:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAukm-000191-82 for qemu-devel@nongnu.org; Thu, 29 Dec 2022 10:23:32 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAukk-0007oT-FH for qemu-devel@nongnu.org; Thu, 29 Dec 2022 10:23:31 -0500 Received: by mail-wm1-x329.google.com with SMTP id m8-20020a05600c3b0800b003d96f801c48so11113687wms.0 for ; Thu, 29 Dec 2022 07:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QJga/ZgW/BZLuSjOrg65Qd9hnGWRDub8ZZsHqX5Js1Y=; b=S5yLeBiw3Huwg8EuUIUUtIeGpByS/KbMa+7VKP9mubPRtWlxl89+dqCtsFjL62epuK CJchzRxOW/YoHMCPYSyJH9sCYnCwZqOK84hLR+Z7tI6qXzp8tgQ0LO9IRT8S0dY6mTeb wyT/SQoP7z0T0bW6l3ex/OWEuOETOsMs2WxixaRnSAylvd0Dv2cjcq7V1AEt4XmGopGA f5flEK9FYOM9tW33LIogZlEzjRf7CMwZQpR4WzLQTCsXCGEYq2KNMXJ0ReWFvGIq3qeS JU5Pfn/wIRqGuStJ75xWuWOmNZOqS60iXRYvdvk+LpirF/qknHxcXBJqs3psDSwtLell zd/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QJga/ZgW/BZLuSjOrg65Qd9hnGWRDub8ZZsHqX5Js1Y=; b=Tsg+2L40Y3QgJ8FZBgzGi8xFGVuHBuvA60yqhBRTW7sDeiN+sM8N0aVixty82OszK4 8mHkrTKo0/XQYpOih9BPyoncHQDB8nWiYXUH53Dy024kuRxAMPRWW2IIZwuK59xF7a6t p+dxq5WSdv/Xq3mEcgOraPnSrZsvgxRjZEVcld1yTf18wnwJq8xnm1WyPiq1RrRU3oLA ymKs9kmx1ZFnR6p/cjlpBkTS02GTFY988rZXV/f9oX+s1pT63cgqYJ0GNQvQSIw/op+N wRDK3c6sKWMo5z0+sjx/AgeIm2ciIXaBiFQhvBSLkdrhEwEaRvLw9GEEjye0Z/izB+AQ rVOg== X-Gm-Message-State: AFqh2kpHWLlZ/ZssO2HMq9sUI7XYLJQ3CYzFBmnMAjpOIkR72O7Xic1g 1ijB6fe51N0aWLCyNNYKa6bhdQqqFPiAVBAy X-Received: by 2002:a05:600c:3b29:b0:3cf:d18e:528b with SMTP id m41-20020a05600c3b2900b003cfd18e528bmr20798117wms.39.1672327408322; Thu, 29 Dec 2022 07:23:28 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m18-20020a05600c3b1200b003a6125562e1sm27700845wms.46.2022.12.29.07.23.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 29 Dec 2022 07:23:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Steven Lee , Peter Delevoryas , Peter Delevoryas , qemu-arm@nongnu.org, Cleber Rosa , Peter Maydell , Beraldo Leal , Wainer dos Santos Moschetta , Troy Lee , Andrew Jeffery , Joel Stanley , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Delevoryas , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jamin Lin Subject: [PATCH 0/9] hw/arm/aspeed_ast10x0: Map more peripherals & few more fixes Date: Thu, 29 Dec 2022 16:23:16 +0100 Message-Id: <20221229152325.32041-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Trying to fix some bugs triggered running Zephyr. Still 2 bugs: 1/ uart:~$ sensor get SYSCLK [00:00:23.592,000] os: ***** USAGE FAULT ***** [00:00:23.593,000] os: Illegal use of the EPSR [00:00:23.593,000] os: r0/a1: 0x00033448 r1/a2: 0x00000000 r2/a3: 0x00047f50 [00:00:23.593,000] os: r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x00000fbd [00:00:23.593,000] os: xpsr: 0x60000000 [00:00:23.593,000] os: Faulting instruction address (r15/pc): 0x00000000 [00:00:23.593,000] os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0 [00:00:23.594,000] os: Current thread: 0x38248 (shell_uart) [00:00:23.601,000] os: Halting system 2/ uart:~$ mcuboot [00:01:04.990,000] os: ***** BUS FAULT ***** [00:01:04.990,000] os: Instruction bus error [00:01:04.991,000] os: r0/a1: 0x00000000 r1/a2: 0x000ffff0 r2/a3: 0x00047ef0 [00:01:04.991,000] os: r3/a4: 0x00000010 r12/ip: 0x6df7ecb5 r14/lr: 0x000188ed [00:01:04.991,000] os: xpsr: 0x61000000 [00:01:04.991,000] os: Faulting instruction address (r15/pc): 0x6df7ecb4 [00:01:04.991,000] os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0 [00:01:04.991,000] os: Current thread: 0x38248 (shell_uart) [00:01:04.994,000] os: Halting system ---------------- IN: PMSA MPU lookup for reading at 0x0001d400 mmu_idx 65 -> Hit (prot rwx) 0x0001d5a2: 6869 ldr r1, [r5, #4] 0x0001d5a4: 4421 add r1, r4 0x0001d5a6: 6883 ldr r3, [r0, #8] 0x0001d5a8: 681c ldr r4, [r3] 0x0001d5aa: 463a mov r2, r7 0x0001d5ac: 4633 mov r3, r6 0x0001d5ae: 46a4 mov ip, r4 0x0001d5b0: e8bd 41f0 pop.w {r4, r5, r6, r7, r8, lr} 0x0001d5b4: 4760 bx ip PMSA MPU lookup for reading at 0x00000008 mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for execute at 0x6df7ecb4 mmu_idx 65 -> Hit (prot rwx) Taking exception 3 [Prefetch Abort] on CPU 0 ...at fault address 0x6df7ecb4 ...with CFSR.IBUSERR PMSA MPU lookup for writing at 0x00047ec8 mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for writing at 0x00047ecc mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for writing at 0x00047ed0 mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for writing at 0x00047ed4 mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for writing at 0x00047ed8 mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for writing at 0x00047edc mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for writing at 0x00047ee0 mmu_idx 65 -> Hit (prot rwx) PMSA MPU lookup for writing at 0x00047ee4 mmu_idx 65 -> Hit (prot rwx) ...taking pending nonsecure exception 5 ...loading from element 5 of non-secure vector table at 0x14 ...loaded new PC 0xa0cd ---------------- HACE isn't really functional there. I probably screwed smth while wiring the peripheral. Not obvious without access to the datasheet. Philippe Mathieu-Daudé (9): hw/watchdog/wdt_aspeed: Map the whole MMIO range hw/arm/aspeed: Use the IEC binary prefix definitions hw/arm/aspeed_ast10x0: Add various unimplemented peripherals hw/arm/aspeed_ast10x0: Map I3C peripheral hw/arm/aspeed_ast10x0: Map the secure SRAM hw/arm/aspeed_ast10x0: Map HACE peripheral hw/misc/aspeed_hace: Do not crash if address_space_map() failed hw/arm/aspeed_ast10x0: Add TODO comment to use Cortex-M4F tests/avocado: Test Aspeed Zephyr SDK v00.01.08 on AST1030 board hw/arm/aspeed_ast10x0.c | 84 ++++++++++++++++++++++++++++++-- hw/arm/aspeed_ast2600.c | 5 +- hw/arm/aspeed_soc.c | 6 +-- hw/misc/aspeed_hace.c | 21 +++++--- hw/watchdog/wdt_aspeed.c | 12 +++-- include/hw/arm/aspeed_soc.h | 14 ++++++ include/hw/watchdog/wdt_aspeed.h | 2 +- tests/avocado/machine_aspeed.py | 41 +++++++++++++++- 8 files changed, 163 insertions(+), 22 deletions(-)