[PATCH] arm: socfpga: arria10: Add save_boot_params()
Ley Foon Tan
lftan.linux at gmail.com
Thu Mar 5 09:56:01 CET 2020
On Wed, Mar 4, 2020 at 8:32 PM Marek Vasut <marex at denx.de> wrote:
>
> On 3/4/20 1:36 AM, Tan, Ley Foon wrote:
> >
> >
> >> -----Original Message-----
> >> From: Marek Vasut <marex at denx.de>
> >> Sent: Tuesday, March 3, 2020 8:13 PM
> >> To: Ley Foon Tan <lftan.linux at gmail.com>
> >> Cc: Tan, Ley Foon <ley.foon.tan at intel.com>; u-boot at lists.denx.de; Simon
> >> Goldschmidt <simon.k.r.goldschmidt at gmail.com>; See, Chin Liang
> >> <chin.liang.see at intel.com>; Chee, Tien Fong <tien.fong.chee at intel.com>
> >> Subject: Re: [PATCH] arm: socfpga: arria10: Add save_boot_params()
> >>
> >> On 3/3/20 10:14 AM, Ley Foon Tan wrote:
> >>> On Mon, Mar 2, 2020 at 6:40 PM Marek Vasut <marex at denx.de> wrote:
> >>>>
> >>>> On 3/2/20 8:20 AM, Tan, Ley Foon wrote:
> >>>> Hi,
> >>>>
> >>>> [...]
> >>>>
> >>>>>> On 2/26/20 8:01 PM, Ley Foon Tan wrote:
> >>>>>> [...]
> >>>>>>> +#define BOOTROM_SHARED_MEM_ADDR
> >>>>>> (CONFIG_SYS_INIT_RAM_ADDR + 0x40000 \
> >>>>>>> + - 0x800) #define
> >>>>>>> +RST_STATUS_SHARED_ADDR
> >>>>>> (BOOTROM_SHARED_MEM_ADDR + 0x438)
> >>>>>>
> >>>>>> Are all these magic values needed or is there some more descriptive
> >>>>>> macro name available for them ?
> >>>>> 0x40000 is onchip ram size and 0x800 is 2KB size.
> >>>>> I can convert these to 2 macos.
> >>>>
> >>>> Aren't those already defined in include/configs/socfpga_common.h ?
> >>> socfpga_common.h have this:
> >>> #define CONFIG_SYS_INIT_RAM_SIZE (0x40000 -
> >> CONFIG_SYS_SPL_MALLOC_SIZE)
> >>>
> >>> But, we can't use it here.
> >>
> >> Why ?
> > CONFIG_SYS_INIT_RAM_SIZE is minus with CONFIG_SYS_SPL_MALLOC_SIZE, not 256KB (0x40000).
>
> Then define the init ram size macro somewhere in
> arch/arm/mach-socfpga/include and use it in both the configs/ and your
> code ? :)
Look at existing header files under arch/arm/mach-socfpga/include/,
can add to base_addr_a10.h.
Regards
Ley Foon
More information about the U-Boot
mailing list