Browse Source

fix(intel): fix bit masking issue in intel_secure_reg_update

intel_secure_reg_update function should apply mask to the value before
write into register.

Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Change-Id: I84bbd06e24b8666528b53030e8359743d438eb5b
pull/1985/head
Siew Chin Lim 3 years ago
committed by Sieu Mun Tang
parent
commit
c9c070994c
  1. 2
      plat/intel/soc/common/socfpga_sip_svc.c

2
plat/intel/soc/common/socfpga_sip_svc.c

@ -344,7 +344,7 @@ uint32_t intel_secure_reg_update(uint64_t reg_addr, uint32_t mask,
{
if (!intel_secure_reg_read(reg_addr, retval)) {
*retval &= ~mask;
*retval |= val;
*retval |= val & mask;
return intel_secure_reg_write(reg_addr, *retval, retval);
}

Loading…
Cancel
Save