From patchwork Mon Apr 19 14:54:24 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: 424013 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2802304jaf; Mon, 19 Apr 2021 08:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuZ388qDNqD+4Lc1WChs+XPRbWFWc7uW4wVOSc7JKjPJgQR/8dB2MNhvBcPNl/qE7WaCZV X-Received: by 2002:a05:6e02:1aaa:: with SMTP id l10mr18339416ilv.29.1618844888619; Mon, 19 Apr 2021 08:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844888; cv=none; d=google.com; s=arc-20160816; b=wSbBwMe6lUWr0vplqNOYsQyRXp9KQOPUEfsiWK50cggTQdNexrzc31jPJC3y9ABKP3 M4Bhokpxx96chIqvj6AyIMieTxu1k8OeMnMkGyar4njFjnKXeIT9JcVqJREZHXnFBc24 mBMyBhAwdOO/xuu75U+K+ZlzgJPQL8WGIwbPdi+N+YzfgvCUCwxaSG8NrGoeeLM7eeb0 kXbhIPuY0YLSrsPsD1boI3RLaYKa+e+YmnKDKAb4JB9p9BGtaYZ9ccjslcoYNvr8bCDW uhww46j/KsYV93E3Y65gw+hh/yQApU9WdiHcAo+feNT3PL+krqZNBZQAdCfVu9BW3EVz w6jQ== 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=hiVgs9/+iJ3i0DlYql/VgFCWa4s85pzlKekXIccHrI4=; b=zyvSb8z8ChpgPvaOs80mfozKPwWjwHH0A0Hb3HC+sx9gTOnyc+bI7Wupo7rHP4u9eT 2jYEs3/XvX8TvYlTOVnwwbgsrfWwkx10k7Fq+XDzSjK2KK87i6IEgXEptC4Vq28BGsWq f4ixaA25VweLrSm/eqN11eDx+TGiO6rc7SwrjWzla5mf1xzFUIo40TqR7X+apoCAzD6q Hw28Qg3IuWdf5TO//rlsS3KmHaMxVftqJczxg4xIRMgsgoFuwEiaNXZCJ5nrRgb/Empk qT6d53wO/Qbs3kxALbjhRwsLpTiQZvhYhDi0U9PTLTuIAZBfeQ9N9XBIUMzQdtfPZfu8 16Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BBbsJudp; 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 l9si16170651ils.131.2021.04.19.08.08.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:08:08 -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=BBbsJudp; 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]:55402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVVQ-00019W-2b for patch@linaro.org; Mon, 19 Apr 2021 11:08:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIh-0003fW-Mz for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:59 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:43888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIf-00072z-IE for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:59 -0400 Received: by mail-wr1-x433.google.com with SMTP id x7so34343624wrw.10 for ; Mon, 19 Apr 2021 07:54:57 -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=hiVgs9/+iJ3i0DlYql/VgFCWa4s85pzlKekXIccHrI4=; b=BBbsJudpBjGS2geH6Muv8QJ+qBQT4hTv5TlDUZzAjkexUKwzbduVZZ5SrfjrgMX641 KsReGPdVI9dsUcbJTyy7PLYEiISSDgXGdi8I6mKVu+ybhP7+ixmMXIYt/oUdVgoVrmKD uU9k/yQeRU6WHpvQ7Qw/53UHdQHuy0RwbxKzJGyQ/6P88Khw6y8eqj+5tfEZFLPdcbWn V2x5vgm9HbO4Ia2PCEJhKcYM/Y9nxAKQ0pPforZizWNJnnK4VsYxEKMj5/gXrGiiJa21 TA1BdzVW4SlvA1zhgEbpNCkgMbAwfJNYHhZ8OmFSc0w0m48AtKqmZYOWhdzFn7RQ9eFM bzjw== 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=hiVgs9/+iJ3i0DlYql/VgFCWa4s85pzlKekXIccHrI4=; b=pSJBeTXhb5c4fa/MozQZiYG6wrwEqbeUdAJ/hKQ+gpd+oNpGsKeYHBxQUonrRXYrdU wCB5s5AsVCPX2KlrJJ97Fb/iVaKxLdRFKUlHRGvjNT6kovLXqK/NM4VMHYNF1VbYNd3l GFe8Uves3uloD/38z2hPwoNoHAfdRHpGgox1OGLhAhR1UBdvseexE6qr6DV2VUqBIorq wvriYSmfhZlP5oH/WOBcPmuEtaXU/OIvRt6YQ+ihdbN5uIn/8y3bv6MxwURHV9LNb9KE s3Ch/hj4zqzSiNE1osfhA3SbE4bGb0VN8y84KN5nRZPb4LkjojpktiblU/fVk7OBhxQU OH3Q== X-Gm-Message-State: AOAM532Ut10/V7HxB8NuQqzClZHq9n10rDSuRa9geTpopox6+LuH0lDo eeEnV70LyKK4jdEb449+zojLdQ== X-Received: by 2002:adf:f88f:: with SMTP id u15mr15075002wrp.368.1618844096138; Mon, 19 Apr 2021 07:54:56 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g84sm16346637wmg.42.2021.04.19.07.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F1BBA1FF9D; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 14/25] tests/tcg/tricore: Add build infrastructure Date: Mon, 19 Apr 2021 15:54:24 +0100 Message-Id: <20210419145435.14083-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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 26c901527e..cf1119bd8e 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") ; + +}