target-arm: A64: Implement DC ZVA
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Peter,
Quoted 9 lines · Peter Maydell
Implement the DC ZVA instruction, which clears a block of memory. The fast path obtains a pointer to the underlying RAM via the TCG TLB data structure so we can do a direct
memset(), with fallback to a simple byte-store loop in the slow path.target-arm/helper.c +0
-0
target-arm/helper.c
Quoted 8 lines
target-arm/helper.c +7
-0+static uint64_t aa64_dczid_read (CPUARMState *env,const ARMCPRegInfo *ri) +{ +ARMCPU *cpu =arm_env_get_cpu (env); +int dzp_bit =1 <<4 ; + +/* DZP indicates whether DC ZVA access is allowed */ +if (aa64_zva_access (env,NULL ) !=CP_ACCESS_OK ) {
I believe this logic for the Data Zero Prohibited field is inverted, causing eglibc to use STP rather than DC ZVA for __memset.
target-arm/helper.c
Quoted 4 lines
target-arm/helper.c +4
-0+ dzp_bit =0 ; + } +return cpu->dcz_blocksize | dzp_bit; +}
Thanks,
Christopher
Signature · 3 lines
Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.