10 Commits

Author SHA1 Message Date
Nathaniel Mitchell 08963cf024 Update asm to support return thunk that is enabled in kernel 6.19
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2026-03-26 13:58:48 -07:00
Stephan f5b750fa07 Fix objtool errors (#2594)
* Fix objtool 'unannotated intra-function call'

Fixes objtool errors in stricter kernel configs

objtool likely wants the function to be annotated with
SYM_CODE_START/SYM_CODE_END (linux/linkage.h). It might be
better to rewrite the linux kernel module assembly files to use gas,
and properly annotate everything, but this should be a quick fix for
now.

* Use module_init/module_exit in linux driver

Fixes objtool errors in stricter kernel configs

* Make init functions static

* Re-add __init & __exit macros in linux driver

* Add semicolons after module_init/module_exit calls

---------

Signed-off-by: J. Stephan Bentze <j.s.bentze@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-29 11:59:38 -08:00
Carles Pey 391f42370c Add SMI detection accuracy improvements
Signed-off-by: Carles Pey <carles.pey@nccgroup.com>
2024-10-21 16:38:00 -07:00
Carles Pey 19e2553138 Add SMI enumeration mode to the smm_ptr module (#2141)
* Add SMI enumeration mode to the smm_ptr module

Signed-off-by: Carles Pey <carles.pey@nccgroup.com>
2024-05-29 10:19:42 -07:00
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
brentholtsclaw 64beb99e1d Update commments to match changes
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2022-01-28 10:52:09 -08:00
BrentHoltsclaw 6d63af8cee Update cpu.asm
update per comments
2022-01-28 10:52:09 -08:00
brentholtsclaw 488b9ca94f Modify swsmi asm to break up B2 and B3
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2022-01-28 10:52:09 -08:00
brentholtsclaw 3fbf973072 Fixup linux swsmi assembly
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2021-06-02 13:27:06 -07:00
abazhaniuk 94fe7f02f1 change setup.py build driver by default. change root directory of chipsec. move WARNING.txt to chipsec. remove PKG-INFO (#107) 2016-10-18 18:19:42 -07:00