|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 2/4] xen/arm: mpu: Define Xen start address for MPU systems
Hi Ayan, On 18/09/2024 19:51, Ayan Kumar Halder wrote: From: Wei Chen <wei.chen@xxxxxxx> On Armv8-A, Xen has a fixed virtual start address (link address too) for all Armv8-A platforms. In an MMU based system, Xen can map its loaded address to this virtual start address. So, on Armv8-A platforms, the Xen start address does not need to be configurable. But on Armv8-R platforms, there is no MMU to map loaded address to a fixed virtual address and different platforms will have very different address space layout. So Xen cannot use a fixed physical address on MPU based system and need to have it configurable. So, we introduce a Kconfig option for users to set the start address. The start address needs to be aligned to 4KB. We have a check for this alignment. It would suggest to add some explanation why you want the start address to be 4KB aligned. In case if the user forgets to set the start address, then 0xffffffff is used as default. This is to trigger the error (on alignment check) and thereby prompt user to set the start address. Also updated config.h so that it includes mpu/layout.h when CONFIG_MPU is defined. Signed-off-by: Wei Chen <wei.chen@xxxxxxx> Signed-off-by: Jiamei.Xie <jiamei.xie@xxxxxxx> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> --- Changes from :- v1 - 1. Fixed some of the coding style issues. 2. Reworded the help message. 3. Updated the commit message. xen/arch/arm/Kconfig | 10 ++++++++++ xen/arch/arm/include/asm/config.h | 4 +++- xen/arch/arm/include/asm/mpu/layout.h | 27 +++++++++++++++++++++++++++ Looking at this patch again, I don't see any modification in xen.lds.S. Is it intended?
Strictly speaking, this doesn't match the Kconfig. AFAIU, we still said the internal code may continue to rely on PAGE_SIZE for the time being. But I think we would want to have a BUILD_BUG_ON(PAGE_SIZE != SZ_4K) to catch any value change. + */ +#if (XEN_START_ADDRESS % PAGE_SIZE) != 0 +#error "XEN_START_ADDRESS must be aligned to PAGE_SIZE" In the error message, you want to mention 4KB. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |