From patchwork Wed May 12 10:20:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 435494 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4699694jao; Wed, 12 May 2021 03:39:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbBKpsIamrvcZiuoKo+g6Wf6iIAGaA5Lc+zTa//apov4vkt06kjbjeo4is2ZNiMyMES7tQ X-Received: by 2002:a37:5b43:: with SMTP id p64mr32288467qkb.131.1620815983808; Wed, 12 May 2021 03:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620815983; cv=none; d=google.com; s=arc-20160816; b=Us83fVShcCvDqbn6IkYRsYGuZbwIWrVerX5Pri6kPYT63X1xjz5YccM5MfsnqqB035 Ig4KcNxBCqRpGxl68HrZotKBilFg5ezoUT/bUG+0wI2BGMUAdDiU8SYFGxrCJTLs8o+w SHUTH4uvu5DjenG/49XXKb7+KmOVkmSGiBlvOZ3YEDqpgDOJIrXRccSbsIVI3aa1Z4Ep aniGZx14kw9OyfjJd3nVVCSNf37Dg+jxDE25CFxwSLg8d49f5k46BbbzAEiKRxwG9YEO 24VsgjUgY+euF152mG4hNwqtlHPAM9nRUazfDFMSxXjOK4bJ9NFbvHloKd6tmNNKsz8P nlyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=l97rhLDxO0XNq5HQNG4JIIr2ozVY5tElcdl90wPdeI0=; b=KaGeJebAcGSEAPuQqA2dRgO2bP1HHNjZYTA+yq3XJLtVobhjTMtvmrRrPcrg3RQ9GX 6VBCGzVZXZiA01tqSahSwjqSg1GARNgPaFpMlxRAk1TwmTl9LrvKyycjOGRNX741GQEC 6V55PJFofLHVPSpmA+f7zncEQvuvR72B5/ZCfKhrjmeWUXNGkrGOCSepUv6SY0sSMGl0 L/FBrbpAXddvqkDrlG0I5x9Y10MBLmMTILCIoEPTqyoZYa7hVaLRE2zaG404YCTU6HCS 5WxTxIWdQL/0PXpaIZROh8XkaO8WB2Bn2IsNupNs+IKQ5KZS9k00q5VXtUhRh+DQp4yJ XWhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=s0+5H6cP; 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=fail (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 z6si15216091qki.136.2021.05.12.03.39.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 May 2021 03:39:43 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b=s0+5H6cP; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgmHH-0000yA-6U for patch@linaro.org; Wed, 12 May 2021 06:39:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgm8b-0000nN-Eb for qemu-devel@nongnu.org; Wed, 12 May 2021 06:30:45 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:42801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgm8X-0000ch-QS for qemu-devel@nongnu.org; Wed, 12 May 2021 06:30:45 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x8so785377wrq.9 for ; Wed, 12 May 2021 03:30:41 -0700 (PDT) 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=l97rhLDxO0XNq5HQNG4JIIr2ozVY5tElcdl90wPdeI0=; b=s0+5H6cPoS6XRe3FxBqZqEc0tMsB9Yw2D63FY8kNmf8shpVwszLz3x1ZvUpXlvLi+t HlxujfHwbUNnBXRcdpqRH45vQ4lrMbPOS0N2LeQaI/q8+ZOHi0CfP7dytxLFJJTybC9y 75dNr9gc5G3PglSC2kEz318irdroAOsQ9zj8IizxwZN5yhWRJodtWil4ZjX0w2OjAbRv CUNZ4Pk7K8X3lKAMeY17bqFrI0yUfYntIVTQw3GLMeidWH1HC6qXFiyu4zeGPTe9fifD 2IoISIbVP/U9MYYfQtkMy10pjnI/9LwnDmMPPCXSdLAuUjWYM01ZPflPBKOSMV6slFNS M/Qg== 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=l97rhLDxO0XNq5HQNG4JIIr2ozVY5tElcdl90wPdeI0=; b=MSdDwKsbSM8SdMkqnNROZqudDOFZTNIbyNhzZz57fU34VYs6fyLvf3vYMx+NRs8VcK PZdqJjz01x69mGE7MO1JGeilSkz/tgD+dPoFme3gK/AGLMmqfFJp5dxy0x6EB+ARV5/K 0GBjS+IonarWRXt5VtSKdMwWVIPihFAO5uyC4y1ZGA4veZ7pY2MAiSaemWW7/oGfwsWS bqp/UhcSJ0ipG0x0pNCyNqbW9+FwiPNEFh+cCbLiJBCr/K1wXi8pyURa01ZFqaFnXz6M WHZ3meW2q/CyOkhVEplU7dnq+6DARfyvrfG3H6xJvWCHGcoK8xTLnIbQI2/4MLizCyBl W5dw== X-Gm-Message-State: AOAM5337w9GUVeyw8EjdEWuEnKD1NVRZUYdsooQiu4lwvhc+V7tR3c1r abIaTHc5vMwD6lBirzSB2c5TYcl7SH810g== X-Received: by 2002:a05:6000:12cc:: with SMTP id l12mr6301489wrx.91.1620815440446; Wed, 12 May 2021 03:30:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w22sm5415169wmc.13.2021.05.12.03.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 03:30:39 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 870601FF9D; Wed, 12 May 2021 11:20:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 14/31] tests/tcg/tricore: Add build infrastructure Date: Wed, 12 May 2021 11:20:34 +0100 Message-Id: <20210512102051.12134-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210512102051.12134-1-alex.bennee@linaro.org> References: <20210512102051.12134-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this includes the Makefile and linker script to build all the tests. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée 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 -- 2.20.1 diff --git a/MAINTAINERS b/MAINTAINERS index 30f1e7d4e4..a3da27843b 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/ Multiarch Linux User Tests M: Alex Bennée 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 = $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS = -T$(TESTS_PATH)/link.ld +ASFLAGS = + +QEMU_OPTS += -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 = 0x80000000, len = 15K + data_ram (w!xp): org = 0xd0000000, len = 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE = DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN = 0xd0000000 ; +__CSA_SIZE = 8k ; +__CSA_END = __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . = ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . = ALIGN(8) ; + *(.data) + *(.data.*) + . = ALIGN(8) ; + __USTACK = . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE = . ; + *(.bss) + *(COMMON) + . = ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. = ASSERT ((__CSA_BEGIN & 0x3f) == 0 , "illegal CSA start address") ; + _. = ASSERT ((__CSA_SIZE & 0x3f) == 0 , "illegal CSA size") ; + +}