From ec61c49f26964969671f91b4b1cb63ee288b3461 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 22 Mar 2024 16:19:50 +0200 Subject: [PATCH] freedreno/registers: drop unsupported features from schema Drop the features from original rules-ng schema that are not supported by the gen_header.py script. Signed-off-by: Dmitry Baryshkov Part-of: --- src/freedreno/registers/rules-fd.txt | 61 +++------------------------- src/freedreno/registers/rules-fd.xsd | 55 +------------------------ 2 files changed, 6 insertions(+), 110 deletions(-) diff --git a/src/freedreno/registers/rules-fd.txt b/src/freedreno/registers/rules-fd.txt index 8b1de10241a..6cc71b99b51 100644 --- a/src/freedreno/registers/rules-fd.txt +++ b/src/freedreno/registers/rules-fd.txt @@ -57,8 +57,6 @@ There should be at most one and at most one tag for any parent. Tags that define top-level entities include: : Declares an addressing space containing registers - : Declares a block of registers, expected to be included by one or - more s : Declares a list of applicable bitfields for some register : Declares a list of related symbolic values. Can describe params to a register/bitfield, or discriminate between card variants. @@ -89,23 +87,14 @@ access something useful. can have the following attributes: - width [optional]: the size, in bits, of a single addressable unit. This is 8 by default for usual byte-addressable memory, but 32 can be useful occasionally for indexed spaces of 32-bit cells. Values sane enough to - support for now include 8, 16, 32, 64. - - size [optional]: total number of addressable units it spans. Can be - undefined if you don't know it or it doesn't make sense. As a special - exception to the merging rules, size attribute need not be specified on all - tags that will result in a merged domain: tags with size can be merged with - tags without size, resulting in merged domain that has size. Error only - happens when the merged domains both have sizes, and the sizes differ. - - bare [optional]: if set to "no", all children items will have the domain - name prepended to their names. If set to "yes", such prefixing doesn't - happen. Default is "no". + support for now include only 32. - prefix [optional]: selects the string that should be prepended to name of every child item. The special value "none" means no prefix, and is the default. All other values are looked up as names and, for each child item, its name is prefixed with name of the earliest variant in the given enum that supports given item. - + @@ -116,12 +105,11 @@ to NV04_PMC_BOOT_0 register, 4-7 belong to NV10_PMC_BOOT_1 register, 0x100-0x103 belong to NV04_PMC_INTR register, and remaining cells are either unused or unknown. The generated .h definitions are: -#define NV_MMIO__SIZE 0x1000000 #define NV04_PMC_BOOT_0 0 #define NV10_PMC_BOOT_1 4 #define NV04_PMC_INTR 0x100 - + @@ -133,7 +121,6 @@ unused or unknown. The generated .h definitions are: Defines a 6-cell address space with each cell 32 bits in size and corresponding to a single register. Definitions are: -#define NV50_PFB_VM_TRAP__SIZE 6 #define NV50_PFB_VM_TRAP_STATUS 0 #define NV50_PFB_VM_TRAP_CHANNEL 1 #define NV50_PFB_VM_TRAP_UNK2 2 @@ -144,16 +131,13 @@ corresponding to a single register. Definitions are: 2.3. Registers What we really want all the time is defining registers. This is done with -, , or tags. The register of course takes + or tags. The register of course takes reg_width / domain_width cells in the domain. It's an error to define a register with smaller width than the domain it's in. The attributes are: - name [required]: the name of the register - offset [required]: the offset of the register - - access [optional]: "rw" [default], "r", or "w" to mark the register as - read-write, read-only, or write-only. Only makes sense for real MMIO - domains. - varset [optional]: the to choose from by the variant attribute. Defaults to first used in currently active prefix. - variants [optional]: space-separated list of and variant ranges that this @@ -223,9 +207,6 @@ Enum is, basically, a set of values. They're defined by tag with the following attributes: - name [required]: an identifying name. - - inline [optional]: "yes" or "no", with "no" being the default. Selects if - this enum should emit its own definitions in .h file, or be inlined into - any / definitions that reference it. - bare [optional]: only for no-inline enums, behaves like bare attribute to - prefix [optional]: only for no-inline enums, behaves like prefix attribute @@ -247,7 +228,7 @@ tags can also be written directly inside tag. - + @@ -615,38 +596,6 @@ Results in: #define NV50_COMPUTE_USER_PARAM__LEN 64 #define NV50_COMPUTE_USER_PARAM__ESIZE 4 -2.7. Groups - -Groups are just sets of registers and/or arrays that can be copied-and-pasted -together, when they're duplicated in several places in the same , -two different s, or have different offsets for different variants. - and only have the name attribute. can appear -wherever can, including inside a . - - - - - - - - - - - - - - - - - - - - -Will get you: - -#define NV50_PGRAPH_TP_MP_TRAPPED_OPCODE(i, j) (0x408270 + (i)*0x1000 + (j)*0x80) -#define NVA0_PGRAPH_TP_MP_TRAPPED_OPCODE(i, j) (0x408170 + (i)*0x800 + (j)*0x80) - 3. The utilities. The header generation utility will take a set of XML files and generate .h diff --git a/src/freedreno/registers/rules-fd.xsd b/src/freedreno/registers/rules-fd.xsd index 414dee1d746..2eedb099a4e 100644 --- a/src/freedreno/registers/rules-fd.xsd +++ b/src/freedreno/registers/rules-fd.xsd @@ -23,14 +23,10 @@ - - - - @@ -119,26 +115,12 @@ - - - - - groupType - - - - - - - - - arrayType @@ -169,10 +151,6 @@ - - - - @@ -181,7 +159,7 @@ - registerType used by reg8, reg16, reg32, reg64 + registerType used by reg32, reg64 @@ -192,7 +170,6 @@ - @@ -218,8 +195,6 @@ - - @@ -237,7 +212,6 @@ - @@ -255,7 +229,6 @@ - @@ -275,14 +248,6 @@ - - - refType - - - - - @@ -382,26 +347,12 @@ - - - Access - - - - - - - - DomainWidth - - - @@ -414,7 +365,6 @@ - @@ -424,11 +374,8 @@ - - -