Hi York, Thanks a lot for your comments!
> -----Original Message----- > From: york sun > Sent: 2016年12月17日 0:39 > To: Z.Q. Hou <zhiqiang....@nxp.com>; u-boot@lists.denx.de; Prabhakar > Kushwaha <prabhakar.kushw...@nxp.com>; Ruchika Gupta > <ruchika.gu...@nxp.com>; Mingkai Hu <mingkai...@nxp.com>; Pratiyush > Srivastava <pratiyush.srivast...@nxp.com> > Subject: Re: [PATCHv2 1/2] ARMv8/fsl-layerscape: Correct the OCRAM size > > On 12/16/2016 01:29 AM, Zhiqiang Hou wrote: > > From: Hou Zhiqiang <zhiqiang....@nxp.com> > > > > The real size of OCRAM is 128KiB, so correct the size of OCRAM. > > And OCRAM reserved 2MiB space, then add a new macro to describe it, > > which is used for MMU setup. > > > > Signed-off-by: Hou Zhiqiang <zhiqiang....@nxp.com> > > --- > > V2: > > - New patch > > > > arch/arm/include/asm/arch-fsl-layerscape/config.h | 8 +++++--- > > arch/arm/include/asm/arch-fsl-layerscape/cpu.h | 8 ++++---- > > 2 files changed, 9 insertions(+), 7 deletions(-) > > > > diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h > > b/arch/arm/include/asm/arch-fsl-layerscape/config.h > > index c50894a..8e2eea3 100644 > > --- a/arch/arm/include/asm/arch-fsl-layerscape/config.h > > +++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h > > @@ -28,8 +28,9 @@ > > #define CONFIG_FSL_TZASC_400 > > #endif > > > > -#define CONFIG_SYS_FSL_OCRAM_BASE 0x18000000 /* initial RAM */ > > -#define CONFIG_SYS_FSL_OCRAM_SIZE 0x00200000 /* 2M */ > > +#define CONFIG_SYS_FSL_OCRAM_BASE 0x18000000 /* initial RAM */ > > +#define SYS_FSL_OCRAM_SPACE_SIZE 0x00200000 /* 2M space */ > > +#define CONFIG_SYS_FSL_OCRAM_SIZE 0x00020000 /* Real size 128K */ > > > > > > > /* DDR */ > > #define CONFIG_SYS_LS2_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30) > > @@ -137,7 +138,8 @@ > > #elif defined(CONFIG_FSL_LSCH2) > > #define CONFIG_SYS_FSL_SEC_COMPAT 5 > > #define CONFIG_SYS_FSL_OCRAM_BASE 0x10000000 /* initial > RAM */ > > -#define CONFIG_SYS_FSL_OCRAM_SIZE 0x00200000 /* 2M */ > > +#define SYS_FSL_OCRAM_SPACE_SIZE 0x00200000 /* 2M space */ > > > Zhiqiang, > > The history behind the OCRAM size is page table size. We started from fixed > table. 2MB was the page granule size to avoid too many tables. > With now MMU code, we can use 4KB page granule to get rid of this macro, > but I'd rather not to create a new table just for this purpose. > > I see you want to use the real OCRAM size to initialize it. Why don't you use > a > new macro like SYS_FSL_OCRAM_REAL_SIZE so you don't have to change > other code. Or better use Kconfig option for the new macro. > The OCRAM_SIZE and OCRAM_REAL_SIZE, I afraid it is confusing. I think the OCRAM size and OCRAM base are hardware attributes and it's better to stay them in the config.h. Thanks, Zhiqiang _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot