Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36589 )
Change subject: cpu/x86/smm: Add helper functions to deal with different save states ......................................................................
Patch Set 3:
Patch Set 3:
We have something similar in src/soc/intel/common/block/include/intelblocks/smihandler.h and src/soc/intel/common/block/smm/smihandler.c where the ops are about getting and setting a register.
- Why is this about pointers to registers and not just getting and setting the explicit register?
Because the size of the registers is not always the same (eax on legacy vs rax on x86_64). Should legacy just pretend to be 64bit and ignore the upper values on get/set?
- I prefer the ops-based approach because the chipset can say "these are my ops" and the other save state versions are garbage collected instead of carrying support for save state versions in the binary.
sounds good.
- Are we planning on converging/sharing the implementation?
It's probably not hard to do that, so yes?