Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-27 Thread Leo Yan
Hi Mark, On Thu, Aug 27, 2015 at 05:31:09PM +0100, Mark Rutland wrote: > On Wed, Aug 26, 2015 at 07:59:50AM +0100, Leo Yan wrote: > > Hi Haojian, > > > > On Wed, Aug 26, 2015 at 09:25:41AM +0800, Haojian Zhuang wrote: > > > On Wed, 2015-08-26 at 00:00 +0800, Leo Yan wrote: > > > > On Tue, Aug 25,

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-27 Thread Mark Rutland
> > Option 2: > > > > memory@0 { > > device_type = "memory"; > > reg = <0x0 0x0 0x0 0x4000>; > > }; > > > > reserved-memory { > > #address-cells = <2>; > > #size-cells = <2>; > > ranges; > > > > mcu_reserved:

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-27 Thread Mark Rutland
On Wed, Aug 26, 2015 at 07:59:50AM +0100, Leo Yan wrote: > Hi Haojian, > > On Wed, Aug 26, 2015 at 09:25:41AM +0800, Haojian Zhuang wrote: > > On Wed, 2015-08-26 at 00:00 +0800, Leo Yan wrote: > > > On Tue, Aug 25, 2015 at 09:43:14PM +0800, Haojian Zhuang wrote: > > > > On Tue, 2015-08-25 at 11:42

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-27 Thread Daniel Thompson
On 26/08/15 02:25, Haojian Zhuang wrote: Option 1: memory@0 { device_type = "memory"; reg = <0x 0x 0x 0x05e0>, <0x 0x05f0 0x 0x00eff000>, <0x 0x06e0 0x0

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-26 Thread Leo Yan
Hi Haojian, On Wed, Aug 26, 2015 at 09:25:41AM +0800, Haojian Zhuang wrote: > On Wed, 2015-08-26 at 00:00 +0800, Leo Yan wrote: > > On Tue, Aug 25, 2015 at 09:43:14PM +0800, Haojian Zhuang wrote: > > > On Tue, 2015-08-25 at 11:42 +0100, Mark Rutland wrote: > > > > > > Are you then going to hack GR

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Haojian Zhuang
On Tue, 2015-08-25 at 16:37 +0100, Leif Lindholm wrote: > On Tue, Aug 25, 2015 at 04:51:22PM +0200, Ard Biesheuvel wrote: > > >>Arm kernel should either fetch memory information from > > >>efi or DT. > > > > > > Absolutely. > > > > > >>Currently arm kernel fetch both efi memory informat

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Haojian Zhuang
On Wed, 2015-08-26 at 00:00 +0800, Leo Yan wrote: > On Tue, Aug 25, 2015 at 09:43:14PM +0800, Haojian Zhuang wrote: > > On Tue, 2015-08-25 at 11:42 +0100, Mark Rutland wrote: > > > > > Are you then going to hack GRUB, release a special HiKey version of > > > > > GRUB, not support any other versions

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Leo Yan
On Tue, Aug 25, 2015 at 09:43:14PM +0800, Haojian Zhuang wrote: > On Tue, 2015-08-25 at 11:42 +0100, Mark Rutland wrote: > > > > Are you then going to hack GRUB, release a special HiKey version of > > > > GRUB, not support any other versions, and still can your firmware > > > > UEFI? > > > > > > I

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Ard Biesheuvel
On 25 August 2015 at 17:37, Leif Lindholm wrote: > On Tue, Aug 25, 2015 at 04:51:22PM +0200, Ard Biesheuvel wrote: >> >>Arm kernel should either fetch memory information from >> >>efi or DT. >> > >> > Absolutely. >> > >> >>Currently arm kernel fetch both efi memory information and >> >

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Leif Lindholm
On Tue, Aug 25, 2015 at 04:51:22PM +0200, Ard Biesheuvel wrote: > >>Arm kernel should either fetch memory information from > >>efi or DT. > > > > Absolutely. > > > >>Currently arm kernel fetch both efi memory information and > >>reserved buffer from DTB at the same time. > > > > No,

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Ard Biesheuvel
On 25 August 2015 at 16:24, Leif Lindholm wrote: > On Tue, Aug 25, 2015 at 09:43:14PM +0800, Haojian Zhuang wrote: >> Since we discussed a lot on this, let's make a conclusion on it. >> >> 1. UEFI could append the reserved buffer in it's memory mapping. > > Yes. It needs to. > > (I will let Mark c

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Leif Lindholm
On Tue, Aug 25, 2015 at 09:43:14PM +0800, Haojian Zhuang wrote: > Since we discussed a lot on this, let's make a conclusion on it. > > 1. UEFI could append the reserved buffer in it's memory mapping. Yes. It needs to. (I will let Mark comment on points 2-4.) > 5. A patch is necessary in kernel.

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Sudeep Holla
On 25/08/15 15:04, Leo Yan wrote: Hi Sudeep, On Tue, Aug 25, 2015 at 12:36:12PM +0100, Sudeep Holla wrote: On 19/08/15 10:37, Leo Yan wrote: On Hi6220, below memory regions in DDR have specific purpose: 0x05e0, - 0x05ef,: For MCU firmware using at runtime; 0x0740,f000 - 0x07

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Leo Yan
Hi Sudeep, On Tue, Aug 25, 2015 at 12:36:12PM +0100, Sudeep Holla wrote: > > > On 19/08/15 10:37, Leo Yan wrote: > >On Hi6220, below memory regions in DDR have specific purpose: > > > > 0x05e0, - 0x05ef,: For MCU firmware using at runtime; > > 0x0740,f000 - 0x0740,: For MCU firmw

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Haojian Zhuang
On Tue, 2015-08-25 at 11:42 +0100, Mark Rutland wrote: > > > Are you then going to hack GRUB, release a special HiKey version of > > > GRUB, not support any other versions, and still can your firmware > > > UEFI? > > > > I don't need to hack GRUB at all. > > Then it is working for you by pure cha

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Sudeep Holla
On 19/08/15 10:37, Leo Yan wrote: On Hi6220, below memory regions in DDR have specific purpose: 0x05e0, - 0x05ef,: For MCU firmware using at runtime; 0x0740,f000 - 0x0740,: For MCU firmware's section; 0x06df,f000 - 0x06df,: For mailbox message data. Unless I am read

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Mark Rutland
Hi, On Tue, Aug 25, 2015 at 09:04:45AM +0100, Haojian Zhuang wrote: > On Mon, 2015-08-24 at 13:48 +0100, Mark Rutland wrote: > > > > > > I don't see why you need reserved-memory here, given you're not > > > > > > referring to > > > > > > these regions by phandle anyway. > > > > > > > > > > - Now

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Mark Rutland
On Tue, Aug 25, 2015 at 11:15:10AM +0100, Haojian Zhuang wrote: > On Tue, 2015-08-25 at 10:46 +0100, Leif Lindholm wrote: > > On Tue, Aug 25, 2015 at 04:13:47PM +0800, Haojian Zhuang wrote: > > > On Mon, 2015-08-24 at 12:49 +0100, Leif Lindholm wrote: > > > > On Mon, Aug 24, 2015 at 06:19:56PM +080

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Leif Lindholm
On Tue, Aug 25, 2015 at 06:15:10PM +0800, Haojian Zhuang wrote: > > > 1. We need support both UEFI and uboot. So the reserved buffer have to > > > be declared in DTB since they are used by kernel driver, not UEFI. > > > > The buffer may need to be declared in DTB also, but it most certanily > > ne

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Haojian Zhuang
On Tue, 2015-08-25 at 10:46 +0100, Leif Lindholm wrote: > On Tue, Aug 25, 2015 at 04:13:47PM +0800, Haojian Zhuang wrote: > > On Mon, 2015-08-24 at 12:49 +0100, Leif Lindholm wrote: > > > On Mon, Aug 24, 2015 at 06:19:56PM +0800, Haojian Zhuang wrote: > > > > > If your EFI memory map describes the

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Leif Lindholm
On Tue, Aug 25, 2015 at 04:13:47PM +0800, Haojian Zhuang wrote: > On Mon, 2015-08-24 at 12:49 +0100, Leif Lindholm wrote: > > On Mon, Aug 24, 2015 at 06:19:56PM +0800, Haojian Zhuang wrote: > > > > If your EFI memory map describes the memory as mappable, it is wrong. > > > > > > When kernel is wor

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Haojian Zhuang
On Mon, 2015-08-24 at 12:49 +0100, Leif Lindholm wrote: > On Mon, Aug 24, 2015 at 06:19:56PM +0800, Haojian Zhuang wrote: > > > If your EFI memory map describes the memory as mappable, it is wrong. > > > > When kernel is working, kernel will create its own page table based on > > UEFI memory map.

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-25 Thread Haojian Zhuang
On Mon, 2015-08-24 at 13:48 +0100, Mark Rutland wrote: > > > > > I don't see why you need reserved-memory here, given you're not > > > > > referring to > > > > > these regions by phandle anyway. > > > > > > > > - Now we have enabled EFI_STUB, so the memory node will be removed in > > > > kernel

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-24 Thread Mark Rutland
> > > > I don't see why you need reserved-memory here, given you're not > > > > referring to > > > > these regions by phandle anyway. > > > > > > - Now we have enabled EFI_STUB, so the memory node will be removed in > > > kernel: > > > efi_entry() > > > \-> allocate_new_fdt_and_exit_b

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-24 Thread Leif Lindholm
On Mon, Aug 24, 2015 at 06:19:56PM +0800, Haojian Zhuang wrote: > > If your EFI memory map describes the memory as mappable, it is wrong. > > When kernel is working, kernel will create its own page table based on > UEFI memory map. Since it's reserved in DTS file as Leo's patch, it'll > be moved t

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-24 Thread Haojian Zhuang
On Mon, 2015-08-24 at 10:51 +0100, Mark Rutland wrote: > On Mon, Aug 24, 2015 at 10:18:45AM +0100, Leo Yan wrote: > > Hi Mark, > > > > On Fri, Aug 21, 2015 at 07:40:59PM +0100, Mark Rutland wrote: > > > On Wed, Aug 19, 2015 at 10:37:35AM +0100, Leo Yan wrote: > > > > On Hi6220, below memory region

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-24 Thread Mark Rutland
On Mon, Aug 24, 2015 at 10:18:45AM +0100, Leo Yan wrote: > Hi Mark, > > On Fri, Aug 21, 2015 at 07:40:59PM +0100, Mark Rutland wrote: > > On Wed, Aug 19, 2015 at 10:37:35AM +0100, Leo Yan wrote: > > > On Hi6220, below memory regions in DDR have specific purpose: > > > > > > 0x05e0, - 0x05ef

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-24 Thread Leo Yan
Hi Mark, On Fri, Aug 21, 2015 at 07:40:59PM +0100, Mark Rutland wrote: > On Wed, Aug 19, 2015 at 10:37:35AM +0100, Leo Yan wrote: > > On Hi6220, below memory regions in DDR have specific purpose: > > > > 0x05e0, - 0x05ef,: For MCU firmware using at runtime; > > 0x0740,f000 - 0x0740,ff

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-23 Thread Leo Yan
Hi Mark, On Sat, Aug 22, 2015 at 09:30:50PM +0800, Leo Yan wrote: > On Fri, Aug 21, 2015 at 07:40:59PM +0100, Mark Rutland wrote: > > On Wed, Aug 19, 2015 at 10:37:35AM +0100, Leo Yan wrote: > > > On Hi6220, below memory regions in DDR have specific purpose: > > > > > > 0x05e0, - 0x05ef,fff

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-22 Thread Leo Yan
Hi Mark, On Fri, Aug 21, 2015 at 07:40:59PM +0100, Mark Rutland wrote: > On Wed, Aug 19, 2015 at 10:37:35AM +0100, Leo Yan wrote: > > On Hi6220, below memory regions in DDR have specific purpose: > > > > 0x05e0, - 0x05ef,: For MCU firmware using at runtime; > > 0x0740,f000 - 0x0740,ff

Re: [PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-21 Thread Mark Rutland
On Wed, Aug 19, 2015 at 10:37:35AM +0100, Leo Yan wrote: > On Hi6220, below memory regions in DDR have specific purpose: > > 0x05e0, - 0x05ef,: For MCU firmware using at runtime; > 0x0740,f000 - 0x0740,: For MCU firmware's section; > 0x06df,f000 - 0x06df,: For mailbox message

[PATCH v1 3/3] arm64: dts: add Hi6220 mailbox node

2015-08-19 Thread Leo Yan
On Hi6220, below memory regions in DDR have specific purpose: 0x05e0, - 0x05ef,: For MCU firmware using at runtime; 0x0740,f000 - 0x0740,: For MCU firmware's section; 0x06df,f000 - 0x06df,: For mailbox message data. This patch reserves these memory regions and add device nod