oxidecomputer / amd-apcb

AMD Generic Encapsulated Software Architecture Platform Security Processor Configuration Block manipulation library
Mozilla Public License 2.0
13 stars 1 forks source link

Better handle token datatype changes #121

Open luqmana opened 6 months ago

luqmana commented 6 months ago

Every token is one of a few types based on its data size: Bool, Byte, Word, Dword. We currently collapse all the defined tokens into a single flat namespace. This does make it a bit annoying if a token gets moved from one to another (e.g. Byte -> Word to accommodate more values in a later version).

One option is to update the codegen to get rid of the flat namespace (https://github.com/oxidecomputer/amd-apcb/pull/120#discussion_r1486569281). The json and binary formats already disambiguate the differently sized token entries.