Home
last modified time | relevance | path

Searched hist:"6 a7e8ebf76a9e25614fd98634f26059953cd9309" (Results 1 – 1 of 1) sorted by relevance

/rk3399_ARM-atf/plat/mediatek/common/
H A Dmtk_smc_handlers.c6a7e8ebf76a9e25614fd98634f26059953cd9309 Wed Jun 08 02:49:24 UTC 2022 Leon Chen <leon.chen@mediatek.com> refactor(mediatek): smc registration services

To modularize SMC handler, provide macro function in mtk_sip_svc.h.
Drivers register SMC name with value in mtk_sip_def.h, and bind the SMC
handler with the SMC ID by calling DECLARE_SMC_HANDLER macro.

MTK_SIP_SMC_FROM_BL33_TABLE expand the SMC table as switch-case table
statically. DECLARE_SMC_HANDLER wrap SMC handlers with a structure and
put in a section.
During cold boot initialization, in MTK_EARLY_PLAT_INIT level parse the
section to assign each handler with an index. Each SMC request can be
identified with switch-case and take the index to call into
corresponding SMC handler.

Signed-off-by: Leon Chen <leon.chen@mediatek.com>
Change-Id: I03da212c786de0ec0ea646ba906065ecfcd82571