Skip to content

Commit

Permalink
xilpm: versal: server: Fix bug in AIE2 zeroization
Browse files Browse the repository at this point in the history
There is a bug in AIE2 zeriozation function when polling for memory
zeroization complete. Currently the entire memory register is being
checked against zero but instead we need to check the bits specific
to the memory tiles. This patch updates the zeroization check by
adding a mask so that only the desired bits are checked for zero.

Signed-off-by: Nicole Baze <nicole.baze@xilinx.com>
Acked-by: Jesus De Haro <jesus.de-haro@xilinx.com>
  • Loading branch information
Nicole Baze authored and Siva Addepalli committed Oct 7, 2022
1 parent 27ddad7 commit 5330a64
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/sw_services/xilpm/src/versal/server/xpm_aie.c
Original file line number Diff line number Diff line change
Expand Up @@ -2030,16 +2030,16 @@ static XStatus Aie2_Zeroization(const XPm_Device *AieDev, u32 ColStart, u32 ColE
(XST_SUCCESS != CoreZeroStatus) ||
(XST_SUCCESS != MemZeroStatus)) {

if (0U == AieRead64(AIE2_TILE_BADDR(NocAddress, Col, Mrow) +
AIE2_MEM_TILE_MODULE_MEM_CTRL_OFFSET)) {
if (0U == (AIE2_MEM_TILE_MODULE_MEM_CTRL_MEM_ZEROISATION_MASK &
(AieRead64(AIE2_TILE_BADDR(NocAddress, Col, Mrow) + AIE2_MEM_TILE_MODULE_MEM_CTRL_OFFSET)))) {
MemTileZeroStatus = XST_SUCCESS;
}
if (0U == AieRead64(AIE2_TILE_BADDR(NocAddress, Col, Row) +
AIE2_CORE_MODULE_MEM_CTRL_OFFSET)) {
if (0U == (AIE2_CORE_MODULE_MEM_CTRL_MEM_ZEROISATION_MASK &
(AieRead64(AIE2_TILE_BADDR(NocAddress, Col, Row) + AIE2_CORE_MODULE_MEM_CTRL_OFFSET)))) {
CoreZeroStatus = XST_SUCCESS;
}
if (0U == AieRead64(AIE2_TILE_BADDR(NocAddress, Col, Row) +
AIE2_MEM_MODULE_MEM_CTRL_OFFSET)) {
if (0U == (AIE2_MEM_MODULE_MEM_CTRL_MEM_ZEROISATION_MASK &
(AieRead64(AIE2_TILE_BADDR(NocAddress, Col, Row) + AIE2_MEM_MODULE_MEM_CTRL_OFFSET)))) {
MemZeroStatus = XST_SUCCESS;
}

Expand Down

0 comments on commit 5330a64

Please sign in to comment.