lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5284FA75.4040601@monstr.eu>
Date:	Thu, 14 Nov 2013 17:29:41 +0100
From:	Michal Simek <monstr@...str.eu>
To:	Rob Herring <robherring2@...il.com>
CC:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	Rob Herring <rob.herring@...xeda.com>,
	microblaze-uclinux@...e.uq.edu.au, devicetree@...r.kernel.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH RFC 15/17] microblaze: Convert from _fdt_start to __dtb_start

On 11/13/2013 05:14 PM, Rob Herring wrote:
> On 11/13/2013 07:40 AM, Michal Simek wrote:
>> On 11/13/2013 11:19 AM, Michal Simek wrote:
>>> On 11/12/2013 08:42 PM, Geert Uytterhoeven wrote:
>>>> Kill the microblaze-specific __fdt_blob section, and start
>>>> using .dtb.init.rodata from <asm-generic/sections.h> for
>>>> built-in DTBs, like most other DT enabled architectures.
>>>>
>>>> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org> Cc:
>>>> Michal Simek <monstr@...str.eu> Cc: Rob Herring
>>>> <rob.herring@...xeda.com> Cc:
>>>> microblaze-uclinux@...e.uq.edu.au Cc:
>>>> devicetree@...r.kernel.org --- Untested, but the resulting
>>>> vmlinux after "make simpleImage.system" looks sane.
>>>>
>>>> QUESTION: The padding of the DTB is gone, is this OK?
>>>
>>> Removing this kernel padding should be fine. I can't remember why
>>> it was there from the beginning.
>>
>> I know why is this here. The reason is process how dtb is passed to
>> the kernel via command line. head.S code just copy that dtb to the
>> same location where compiled-in dts is expected and kernel doesn't
>> need to care about position of dtb because this copy is done
>> without MMU. And the full kernel is covered by 2 tlbs and we don't
>> need to use another TLB for dtb mapping.
>>
>> It means pad matters a lot. Because u-boot ITS format doesn't use 
>> simpleImage target but the kernel need to have a space for copying 
>> dtb to this kernel location.
>>
>> Let me think about if there is an easy way to handle dtbs which are
>> passed from bootloader.
> 
> Isn't the built-in dtb in a RO init section? Seems like a bad idea to
> write to it. Also, it will be a double copy because a built-in dtb has
> to be copied out of init section.

Microblaze has it currently out of RO section.
This patch is adding it there.

I have looked at powerpc flow which is probably the closest to our version.

head.S
Saving dtb pointer to r31 then initial_mmu which setups 16MB tlb for kernel
then some exception and calling machine_init()->early_init_devtree()
->move_device_tree() where also change initial_boot_params location
for unflatten_device_tree() in setup_arch().

Ben: I didn't find any TLB entry for DTB itself.
Does it mean that I missed it or that powerpc can access in machine_init()
the whole memory space?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



Download attachment "signature.asc" of type "application/pgp-signature" (264 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ