Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding optional CPUID field in microarchitecture schema and in json file for Arm architectures #110

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

paolotricerri
Copy link
Contributor

@paolotricerri paolotricerri commented Jun 11, 2024

As part of archspec/archspec#168 on the archspec repo, it was decided to add, where it made sense for ARM cores a new field, called cpuid rather than adding a new submodule just for that.

These changes aim at:

  • adding the optional field in the microarchitecture_schema file
  • introducing the field "cpuid" in the ARM microarchitectures

This field will be used in the cpu/detect.py file in the archspec repo, for which a separate PR will be opened.

CC: @dslarm

 - Added the new optional field in microarchitectures schema
 - Add field where appropriate in microarchitecture
@paolotricerri
Copy link
Contributor Author

Sorry, didn't realise I had not tagged @alalazo in the review.

Thanks
P

Copy link
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's work on this one first, to get the detection based on cpuid/cpupart working. Then we can add neoverse_n2 and deprecate the neoverse_v2 optional features.

@@ -2906,7 +2907,8 @@
"flags": "-tp {name}"
}
]
}
},
"cpuid": "0x41d0c"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the vendor field above, which if I understand correctly covers for the first part of the cpuid information (there's a mapping below in the file to go from hex code to vendor name). The second part seems to be the cpupart, i.e. 0xd0c. If that's the case, can we just add that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I have replaced cpuid with cpupart and removed the cpu implementer part from the string.

In the archspec repo, I'll apply the changes to deal with the cpupart field from the json.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alalazo , I have pushed on this branch, the introduction of cpupart instead of cpuid as per above and kept the field optional.

@alalazo alalazo self-assigned this Jul 5, 2024
The `cpuid` is the concatenation of the
`cpu implementer` and the `cpu part` coming from
/proc/cpuinfo.

Instead of having the `cpuid`, we have `cpupart`
in the json file, as the `cpu implementer` can
be decuded from the conversions table at the end
of the microarchitectures.json file.
@paolotricerri paolotricerri mentioned this pull request Jul 8, 2024
Copy link
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@alalazo alalazo merged commit 5a4ffdb into archspec:master Jul 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants