-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support Genoa #123
Support Genoa #123
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wooo thanks for updating this! I took a look at the commits besides my own and they look good mostly. Just some questions about FIXMEs/TODOs left in the code
src/ondisk.rs
Outdated
// XXX: Not that useful. | ||
impl Default for DdrDqPinMapElementLane { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop this impl then or is it actually used somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No--since it is used.
It's a design limitation of the impl_struct_serde_conversion
macro.
The reason is if we have a struct like this
struct X {
a: u32,
b: u32,
}
... and then build an instance up like this (which is what impl_struct_serde_conversion
does):
X::builder().with_a(3).with_b(4).build()
... it actually returns an instance of X
at X::builder()
already. That means it has to default it--what would be the values of a
and b
otherwise? Even let's say we avoided that somehow, what's the value of the expression X::builder().with_a(3)
? Remember that X
is the actual memory-mapped AMD struct--so we can't just change it to make all fields optional or something.
This could be avoided by having some (smarter) intermediate builder struct--but most of the time you really DO want defaults anyway.
In the specific case of DdrDqPinMapElementLane
you want to use all 32 possible values but then you'd repeat them again anyhow--so it's not clear how to materially improve the accessors or validation.
src/ondisk.rs
Outdated
#[derive(FromBytes, AsBytes, Unaligned, PartialEq, Debug, Copy, Clone)] | ||
#[repr(C, packed)] | ||
pub struct Ddr5CaPinMapElementLane { | ||
pins: [u8; 14], // TODO: nicer pin type instead of u8; especially for 0xff "un" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a general clean memory types clean up issue to link with these TODOs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have much the same questions as Luqman. Also, we should rename the lone WIP commit to something that's not a WIP. |
6735d0d
to
596a131
Compare
…isted under wrong data types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating this @daym! Looks like there are SerdeHex related errors breaking CI. Pending that I think we can merge this and address tagged issues in follow up
ce31b34
to
a76f2dd
Compare
Hi, this breaks compatibility with several CPU families (at least Renoir/Cezanne), which use "BCBA" as signature ending (not sure it was fully compatible before but after this commit it is definitely not). Confirmed: Renoir/Cezanne did work before this commit. |
Fixes #110.
Successfully tested on opal.