From a2e0123484e62df8ed9f2943dbd158471bf31221 Mon Sep 17 00:00:00 2001 From: Okash Khawaja Date: Mon, 14 Nov 2022 12:50:30 +0000 Subject: [PATCH] fix(cpus): update doc and check for plat_can_cmo plat_can_cmo must not clobber x1 but the doc doesn't mention that. This patch updates the doc to mention x1. It also adds check for plat_can_cmo to `dcsw_op_louis` which was missed out in original patch. Signed-off-by: Okash Khawaja Change-Id: I721376bf3726520d0d5b0df0f33f98ce92257287 --- docs/getting_started/porting-guide.rst | 4 ++-- lib/aarch64/cache_helpers.S | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/getting_started/porting-guide.rst b/docs/getting_started/porting-guide.rst index 7f3805494..aa57e1db6 100644 --- a/docs/getting_started/porting-guide.rst +++ b/docs/getting_started/porting-guide.rst @@ -1502,8 +1502,8 @@ When CONDITIONAL_CMO flag is enabled: - This function indicates whether cache management operations should be performed. It returns 0 if CMOs should be skipped and non-zero otherwise. -- The function must not clobber x2 and x3. It's also not safe to rely on stack. - Otherwise obey AAPCS. +- The function must not clobber x1, x2 and x3. It's also not safe to rely on + stack. Otherwise obey AAPCS. Modifications specific to a Boot Loader stage --------------------------------------------- diff --git a/lib/aarch64/cache_helpers.S b/lib/aarch64/cache_helpers.S index 67fafb1e7..314ed6efd 100644 --- a/lib/aarch64/cache_helpers.S +++ b/lib/aarch64/cache_helpers.S @@ -217,6 +217,7 @@ dcsw_loop_table: func dcsw_op_louis + check_plat_can_cmo dcsw_op #LOUIS_SHIFT, #CLIDR_FIELD_WIDTH, #LEVEL_SHIFT endfunc dcsw_op_louis