I've played around here, and I'm trying to consider what the final json file should be.
It will definitely contain a #define to value list, but the struct info is more where a decision needs to be made.
The options are mostly
a) encode C representations structs/typdefs/anon structs so we can recreate the C structs nearly 1:1 just with versioning
b) a set of memory descriptors per RPC describing what the buffer to send to the fw for a command should contain
The first is where the code is at in gsp-parse-c-structs typedefs and anon structs make this messy.
I'm mostly leaning towards (b) some flat structs per command that we just encode in the driver. It might make it slightly harder to validate against the NVIDIA C headers but I think it makes more sense in the long run.
I've played around here, and I'm trying to consider what the final json file should be.
It will definitely contain a #define to value list, but the struct info is more where a decision needs to be made.
The options are mostly
a) encode C representations structs/typdefs/anon structs so we can recreate the C structs nearly 1:1 just with versioning
b) a set of memory descriptors per RPC describing what the buffer to send to the fw for a command should contain
The first is where the code is at in gsp-parse-c-structs typedefs and anon structs make this messy.
I'm mostly leaning towards (b) some flat structs per command that we just encode in the driver. It might make it slightly harder to validate against the NVIDIA C headers but I think it makes more sense in the long run.