From nobody Mon Nov 25 08:00:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1717480110; cv=none; d=zohomail.com; s=zohoarc; b=S7Yq9Ncf0DkPaza7DJz6nSNjVgmOF8z4Cf77+GZWH4OUDW2t0NDUtpvFuPdbk48nhiZJ6DNnrSR34FDLXS1Me/Pf2RDvP/2tnev76G5rTeQ1TJwT0fy8oKNMZvDzqP/h6DtvNvmXCGI/LndYV8AcftmYnagIFtFTgVfb1PBRYbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717480110; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=/tgqvqOjDq16UHG30X8+n+tFTA57T8zK+Her3T+rJKw=; b=YV0TALxzlgjbmO0VnQupVTvdqmUribap++gkZVKcnZ2wilH/KpO6WO8qdDTlP32iqOVgFh3aAbz80nFOJKoDtdGscYBqp4Gy0VKmToK5Qc962ke/kSMXN5wimErq5ff1ZT4/iTADjraQWSZiByAOGNTsOT1dnNZdNLe5BM6HQwE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717480110076131.04508150237655; Mon, 3 Jun 2024 22:48:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEN1L-0000US-F0; Tue, 04 Jun 2024 01:47:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEMzk-0006lH-5t; Tue, 04 Jun 2024 01:46:05 -0400 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEMzi-0000aq-B3; Tue, 04 Jun 2024 01:46:03 -0400 Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 4 Jun 2024 13:44:47 +0800 Received: from localhost.localdomain (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Tue, 4 Jun 2024 13:44:47 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Andrew Jeffery , Joel Stanley , Alistair Francis , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , "open list:ASPEED BMCs" , "open list:All patches CC here" CC: , , Subject: [PATCH v5 16/17] test/avocado/machine_aspeed.py: Add AST2700 test case Date: Tue, 4 Jun 2024 13:44:37 +0800 Message-ID: <20240604054438.3424349-17-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240604054438.3424349-1-jamin_lin@aspeedtech.com> References: <20240604054438.3424349-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=211.20.114.72; envelope-from=jamin_lin@aspeedtech.com; helo=TWMBX01.aspeed.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_FAIL=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Jamin Lin From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1717480112054100003 Add a test case to test Aspeed OpenBMC SDK v09.01 on AST2700 board. It loads u-boot-nodtb.bin, u-boot.dtb, tfa and optee-os images to dram first which base address is 0x400000000. Then, boot and launch 4 cpu cores. ``` qemu-system-aarch64 -machine ast2700-evb -device loader,force-raw=3Don,addr=3D0x400000000,file=3Dworkdir/u-boot-= nodtb.bin \ -device loader,force-raw=3Don,addr=3Duboot_dtb_load_addr,file=3Dworkdir= /u-boot.dtb\ -device loader,force-raw=3Don,addr=3D0x430000000,file=3Dworkdir/bl31.bi= n\ -device loader,force-raw=3Don,addr=3D0x430080000,file=3Dworkdir/optee/t= ee-raw.bin\ -device loader,cpu-num=3D0,addr=3D0x430000000 \ -device loader,cpu-num=3D1,addr=3D0x430000000 \ -device loader,cpu-num=3D2,addr=3D0x430000000 \ -device loader,cpu-num=3D3,addr=3D0x430000000 \ -smp 4 \ -drive file=3Dworkdir/image-bmc,format=3Draw,if=3Dmtd ``` A test image is downloaded from the ASPEED Forked OpenBMC GitHub release re= pository : https://github.com/AspeedTech-BMC/openbmc/releases/ Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater --- tests/avocado/machine_aspeed.py | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed= .py index cec0181424..3a20644fb2 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -311,6 +311,17 @@ def do_test_arm_aspeed_sdk_start(self, image): self, 'boot', '## Loading kernel from FIT Image') self.wait_for_console_pattern('Starting kernel ...') =20 + def do_test_aarch64_aspeed_sdk_start(self, image): + self.vm.set_console() + self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw') + + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2023.10') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...') + self.wait_for_console_pattern("systemd[1]: Hostname set to") + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') =20 def test_arm_ast2500_evb_sdk(self): @@ -375,3 +386,54 @@ def test_arm_ast2600_evb_sdk(self): 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); year =3D time.strftime("%Y") self.ssh_command_output_contains('/sbin/hwclock -f /dev/rtc1', yea= r); + + def test_aarch64_ast2700_evb_sdk_v09_01(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:ast2700-evb + """ + + image_url =3D ('https://github.com/AspeedTech-BMC/openbmc/releases= /' + 'download/v09.01/ast2700-default-obmc.tar.gz') + image_hash =3D 'b1cc0fd73c7650d34c9c8459a243f52a91e9e27144b8608b26= 45ab19461d1e07' + image_path =3D self.fetch_asset(image_url, asset_hash=3Dimage_hash, + algorithm=3D'sha256') + archive.extract(image_path, self.workdir) + + num_cpu =3D 4 + image_dir =3D self.workdir + '/ast2700-default/' + uboot_size =3D os.path.getsize(image_dir + 'u-boot-nodtb.bin') + uboot_dtb_load_addr =3D hex(0x400000000 + uboot_size) + + load_images_list =3D [ + { + 'addr': '0x400000000', + 'file': image_dir + 'u-boot-nodtb.bin' + }, + { + 'addr': str(uboot_dtb_load_addr), + 'file': image_dir + 'u-boot.dtb' + }, + { + 'addr': '0x430000000', + 'file': image_dir + 'bl31.bin' + }, + { + 'addr': '0x430080000', + 'file': image_dir + 'optee/tee-raw.bin' + } + ] + + for load_image in load_images_list: + addr =3D load_image['addr'] + file =3D load_image['file'] + self.vm.add_args('-device', + f'loader,force-raw=3Don,addr=3D{addr},file=3D= {file}') + + for i in range(num_cpu): + self.vm.add_args('-device', + f'loader,addr=3D0x430000000,cpu-num=3D{i}') + + self.vm.add_args('-smp', str(num_cpu)) + self.do_test_aarch64_aspeed_sdk_start(image_dir + 'image-bmc') + --=20 2.25.1