From nobody Tue Feb 10 06:25:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1620123043; cv=none; d=zohomail.com; s=zohoarc; b=LPi1zHwGHcRgmPCvWzgdDG9KowzCQjjKJf4VtbP3ZtgE7kfOFCP9AYO0KU8bxHCdRX3ha2Ej8Std5FeNcPGhczmsDf3/5CiUkdMy1N3Ti4gUzM8gT5cOjDWDm/PvyIkyuYIM0bTSnwtbi/4yhkm5fnlVzlk9/Wd7kekIiLhd+Yo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620123043; 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; bh=NVoblo6bOlZq118cknJIt8N7dip9vFj2ILUd1WjhqJA=; b=hSOHBbzU6Up2ZINR2eC1B0E10s61ufoAsLLu6EJUFNYw9rUWDIpZ8FrCJHDCNvJiOxbKXe9FM3KW0NSPP8RuR3SsG4LPukRGca54WcgAf0baqAYQ1MeIlQCFGejxWms5mPMyAt1ceNMGNi8vMygjYDli1lWlMU7qHHwwqtMNUF0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1620123043472763.4948376916269; Tue, 4 May 2021 03:10:43 -0700 (PDT) Received: from localhost ([::1]:56358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lds0o-0003MV-92 for importer@patchew.org; Tue, 04 May 2021 06:10:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldrtC-0002oB-Kz for qemu-devel@nongnu.org; Tue, 04 May 2021 06:02:50 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:44929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldrtA-0003Hm-S5 for qemu-devel@nongnu.org; Tue, 04 May 2021 06:02:50 -0400 Received: by mail-wr1-x430.google.com with SMTP id l13so7097620wru.11 for ; Tue, 04 May 2021 03:02:48 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p10sm15055132wrr.58.2021.05.04.03.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 03:02:39 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0C4A81FF9D; Tue, 4 May 2021 11:02:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NVoblo6bOlZq118cknJIt8N7dip9vFj2ILUd1WjhqJA=; b=NTNNnRvxSmMcvk9M7B/yScV3PsisQ47TuyVKYUAtTmcLrxoAP4+ueVKTQGIVIZKEjV kBNsVAqd0fjhvlnZcZ9KYylBoW2HJPxcw0khQCzKAXXBFzpmcM2a1EhfzydIKZTvrwXI pFCjLj1wJX8NSdYrQfGkPGUjU33zER8eNcwm475J25jk7N7z8Tn2ZPHgyy52TsV2AeM3 vHz234ShDku4UYWk0zqYbVfANmH2nhoW0VoPMh59e/NcZ30ia0q0UfyEMOTIB9qeDZ0S MEVApWqp0vgBJzwUNak0x/LTYn9d2YaVuPIIb3DEZT6V4VBWX+JhJYNah26lzdK4Yr30 OKLg== 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:mime-version:content-transfer-encoding; bh=NVoblo6bOlZq118cknJIt8N7dip9vFj2ILUd1WjhqJA=; b=EPdoWAfOhOt0WdQE6ixuhYXYYAXCA3fIwcv/6Lmi9u0J1idA80tODEwHsnqsKPSdgY 9uJLTn/5V2bdvXMz1mrJsEN71qOgOVmGmdy5q5AcIQlQbTMabqZ4mq48cBSaB2FOXXPv c1ZcMOLK6gApmE8ZucQEdAs2NL1sdSz9r/h6e2I5JDjnCNmnHCprO/g0Y5yNTbzN52sY 0US3gJJZNXG4l17ZDi7rGzXqp2hBWNz3F6qvrIf/7PWc2o0iYtOGKNevhrOyxNS+Iqwh UKLyRmgtuzKlx3nCPiKBWcCHz8eyZ7nqVPZf6wLWBDcSlAei5pB+bJ4QEIXYGPfxl1OH diIQ== X-Gm-Message-State: AOAM530Z0TKUBvewtTm9cG+tdTNl0ZpWnGNLhVfs1mbJEWc+Qu7wL57Y UNo2u5rHYc144SgASvmc5GaVJtXVZtxKiA== X-Google-Smtp-Source: ABdhPJzcUATtHmik7T1ZCuEBevXNerW2b/lD0oahe+jMU/uvhWhHjB5TdjcSpzar7cVVV+lBg2VQQA== X-Received: by 2002:a5d:4c8a:: with SMTP id z10mr31142265wrs.395.1620122567336; Tue, 04 May 2021 03:02:47 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 14/30] tests/tcg/tricore: Add build infrastructure Date: Tue, 4 May 2021 11:02:07 +0100 Message-Id: <20210504100223.25427-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210504100223.25427-1-alex.bennee@linaro.org> References: <20210504100223.25427-1-alex.bennee@linaro.org> 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=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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=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: fam@euphon.net, berrange@redhat.com, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann this includes the Makefile and linker script to build all the tests. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-5-kbastian@mail.uni-paderborn.de> --- MAINTAINERS | 1 + tests/tcg/tricore/Makefile.softmmu-target | 15 ++++++ tests/tcg/tricore/link.ld | 60 +++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 tests/tcg/tricore/Makefile.softmmu-target create mode 100644 tests/tcg/tricore/link.ld diff --git a/MAINTAINERS b/MAINTAINERS index fc0b429b45..4d3727cad5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -378,6 +378,7 @@ S: Maintained F: target/tricore/ F: hw/tricore/ F: include/hw/tricore/ +F: tests/tcg/tricore/ =20 Multiarch Linux User Tests M: Alex Benn=C3=A9e diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/= Makefile.softmmu-target new file mode 100644 index 0000000000..d64a99b95f --- /dev/null +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -0,0 +1,15 @@ +TESTS_PATH =3D $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS =3D -T$(TESTS_PATH)/link.ld +ASFLAGS =3D + +QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel + +%.pS: $(TESTS_PATH)/%.S + $(HOST_CC) -E -o $@ $< + +%.o: %.pS + $(AS) $(ASFLAGS) -o $@ $< + +%.tst: %.o + $(LD) $(LDFLAGS) $< -o $@ diff --git a/tests/tcg/tricore/link.ld b/tests/tcg/tricore/link.ld new file mode 100644 index 0000000000..364bcdc00a --- /dev/null +++ b/tests/tcg/tricore/link.ld @@ -0,0 +1,60 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-tricore") +OUTPUT_ARCH(tricore) +ENTRY(_start) + +/* the internal ram description */ +MEMORY +{ + text_ram (rx!p): org =3D 0x80000000, len =3D 15K + data_ram (w!xp): org =3D 0xd0000000, len =3D 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE =3D DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN =3D 0xd0000000 ; +__CSA_SIZE =3D 8k ; +__CSA_END =3D __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . =3D ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . =3D ALIGN(8) ; + *(.data) + *(.data.*) + . =3D ALIGN(8) ; + __USTACK =3D . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE =3D . ; + *(.bss) + *(COMMON) + . =3D ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. =3D ASSERT ((__CSA_BEGIN & 0x3f) =3D=3D 0 , "illegal CSA start addres= s") ; + _. =3D ASSERT ((__CSA_SIZE & 0x3f) =3D=3D 0 , "illegal CSA size") ; + +} --=20 2.20.1