Files
chipsec-chipsec/drivers/linux/amd64
Mathias Krause cbe7bc39a5 drivers/linux: simplify __swsmi__()
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>
2022-02-16 08:22:33 -08:00
..
2022-02-16 08:22:33 -08:00