mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-07-26 07:17:31 +00:00
There are two reasons to use inline functions and numbered-CSR instead of simply string concat. 1, With old style, CSR names have to be written in lower cases and cannot prefix anything. This sometimes causes confusion with variables. For example, csr_write(sstatus, sstatus). Changing to inline function with MACROs can reduce confusion: csr_write(CSR_SSTATUS, sstatus) 2, Using number macros allows us to manage CSRs in a more organized way. We can now put CSR names in variables or arrays and access them using variables instead of just string names. Tracked-On: #8838 Signed-off-by: Yifan Liu <yifan1.liu@intel.com> Acked-by: Wang Yu1 <yu1.wang@intel.com>