]> git.proxmox.com Git - mirror_edk2.git/commit - QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmm.h
QuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlers
authorMichael Kinney <michael.d.kinney@intel.com>
Wed, 5 Oct 2016 03:03:24 +0000 (20:03 -0700)
committerMichael Kinney <michael.d.kinney@intel.com>
Fri, 7 Oct 2016 21:56:29 +0000 (14:56 -0700)
commit29f169d17a0f09cd1e05c984da5965e08f2b696e
tree3986f5c721c7cf1a7e70b88b7560aa5f2bcaf87f
parentf9c3b1b5343f53705f1ab72c55c1db440b01f36f
QuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlers

https://bugzilla.tianocore.org/show_bug.cgi?id=136

1) Add CallbackContext field to the DATABASE_RECORD structure that
   is set to the RegisterContent value passed to QNCSmmCoreRegister().
   This is the content that must be passed to the SMI handler when
   its source is triggered.

2) Update usage of ChildContext field in the DATABASE_RECOD to use
   CopyMem() instead of structure assignments to avoid compiler
   use of memcpy() intrinsics

This issue was reproduced using the unit test at:

https://github.com/mdkinney/edk2/tree/Bug51/Reproduce

An ASSERT() is generated the first time the periodic SMI
handler is triggered.  After applying this patch, the
DEBUG() messages from the periodic SMI handler in this
unit test are generated.

Cc: Kelly Steele <kelly.steele@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNC/QNCSmmPeriodicTimer.c
QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmm.h
QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmmCore.c