mirror of
https://github.com/chipsec/chipsec
synced 2026-06-08 13:31:00 +00:00
cbe7bc39a5
The current implementation of __swsmi__ for x86-64 is rather complicated as it uses more registers than needed. Simplyfy it. We can use the passed SMI_CTX buffer as scratch space without the need to use intermediate registers (beside for RDI, for which we use R10 -- a callee clobbered register). Bring the implementation more in line with its OS X counterpart and adapt the comments and code to reflect reality, namely: - change the C type members to mirror the used (and intended) registers, - mark the registers as in/out parameters in the comments, - drop the bogus comment about clobbering DX, as we don't do that and - fix and tweak the comment about split i/o because of picky firmwares. Signed-off-by: Mathias Krause <minipli@grsecurity.net>