Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Problem with RISCV CSRs
  • From: eugene largest.net <eugene@xxxxxxxxxxx>
  • Date: Tue, 15 Apr 2025 20:10:13 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=largest.net; dmarc=pass action=none header.from=largest.net; dkim=pass header.d=largest.net; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C5kFTeluHElTGbXbi65QTu33PV3U7tlSRMCA3hjbmwk=; b=ObCdHZXLjNRfNa3XXgbkxKkMHY/TglqCm90RrCkCg3pjcvpgrlh3wus4oO3V7k1pjfzaPP+mv4kpEAzynUkrgJNqnAxcsSGCRJyOEQsLWnRHsUS/qrTodRW/y1Q/RgYBXdlIfPAlUAXscrhrE819iMqBXG0rIN6xOwS2KhuESxKvefwZmTyClpEFUSlcYXx8B5SSTIN9vFwDzX2hE5VwJp9K8CoVzz6/GNIl1QD9jU4lmoZqn2B0qVKRnixay0hWKDzPccRKkekScBJ9efEfd3xZHjyfxag3gi2ROnK2WC0N5TtIf692kQTm6fuAqiuj+ilKIPSQ8AVizOneffpnyA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oyBaxE8oZHogRT3n+sK4mtFVaCbFyjg4bEFuhmFUpIYfkgatkbD/ATDDWvrbEcQl8RhwerqocFlH2n6lzMtqql4jGkxLnAPhagMDq1Y7qVjPI2tfDsVqccgLSS1tHEWwyIzS6Ik7oM5GdVYPOA9j0r6UMWLZeDsgZ2afhSKtRumu49TBukpnplalmowhXzSpO6AkTGOx47MNjybghVtyIcypfPYyByJWYvPb/vUppA4qEMu13v9kz0/vl5wpdCHJ8F19VZ116j63qV4QFfJuaJOHMSKdP+fbgk54jwIJD1cCNHPQxEviauOjAQ/y8Tn6QOTJO0FM/pBUI2EtBBqRXQ==
  • Delivered-to: tcf-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/tcf-dev/>
  • List-help: <mailto:tcf-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHbrgV9MwjFu8zP8kONS3ZFvm1mL7OlIytu
  • Thread-topic: [tcf-dev] Problem with RISCV CSRs

Yes, the list appears outdated.
I'll remove the old entries.
Thanks,
Eugene

From: tcf-dev <tcf-dev-bounces@xxxxxxxxxxx> on behalf of Anton Bäckström via tcf-dev <tcf-dev@xxxxxxxxxxx>
Sent: Tuesday, April 15, 2025 5:53 AM
To: tcf-dev@xxxxxxxxxxx <tcf-dev@xxxxxxxxxxx>
Cc: Anton Bäckström <anton.backstrom@xxxxxxxxxxx>; arvid.bjoerkengren@xxxxxxxxxxx <arvid.bjoerkengren@xxxxxxxxxxx>
Subject: [tcf-dev] Problem with RISCV CSRs
 
Hello,
I found some issues in disassembler-riscv.c,
in static const CSRDefinition csr_regs[] :

These CSRs,
{ "ustatus",     0x000 },
{ "uie",         0x004 },
{ "utvec",       0x005 },
{ "uscratch",    0x040 },
{ "uepc",        0x041 },
{ "ucause",      0x042 },
{ "utval",       0x043 },
{ "uip",         0x044 },
{ "sedeleg",     0x102 },
{ "sideleg",     0x103 },
are not in the latest spec, RISC-V Privileged Architectures Version 20241017 ratified.
I found them in the 20190608 version of the priv spec, but they have since been removed.
Can they be removed here, or are they needed for backwards compatibility to old specs?

This CSR,
{ "boom_dbg",       0x7c1 }
Is not a general CSR from the RISC-V specs, it seems to be a custom CSR for the The Berkeley Out-of-Order RISC-V Processor.
It clashes with one of our own custom CSRs.

This CSR,
{ "scontext", 0x7aa },
is wrong. It should be 0x5A8 according to the latest priv spec (and also latest debug spec).

Best regards,
Anton Bäckström
Software engineer
Frontgrade Gaisler

Frontgrade Gaisler AB, Kungsgatan 12, SE-411 19, GÖTEBORG, Sweden.
+46 (0) 31 775 8650, www.gaisler.com

Please consider the environment before printing this email 



Back to the top