Hi Henry,
On 01/08/2023 04:44, Henry Wang wrote:
From: Wei Chen <[email protected]>
Xen defines some global configuration macros for Arm in config.h.
However there are some address layout related definitions that are
defined for MMU systems only, and these definitions could not be
used by MPU systems. Adding ifdefs with CONFIG_HAS_MPU to gate these
You haven't yet introduced HAS_MPU. So I would suggest to write: 'Adding
ifdefs to differentiate the MPU from MMU layout will result in a ...'.
definitions will result in a messy and hard-to-read/maintain code.
So move MMU related definitions to a new file, i.e. mmu/layout.h to
avoid spreading "#ifdef" everywhere.
AFAICT, you are moving all memory layout definition in a separate file.
So I would say it explicitely rather than using "MMU related definitions".
Signed-off-by: Wei Chen <[email protected]>
Signed-off-by: Penny Zheng <[email protected]>
Signed-off-by: Henry Wang <[email protected]>
With the comments addressed:
Reviewed-by: Julien Grall <[email protected]>
Cheers,
--
Julien Grall