Re: [PATCH 2/5] arm64, thunder: Add initial dts for Cavium Thunder SoC

From: Mark Rutland
Date: Thu Jul 31 2014 - 07:33:12 EST


Please send plain text rather than HTML email; this is becoming painful
to reply to.

On Thu, Jul 31, 2014 at 12:12:33PM +0100, Ganapatrao Kulkarni wrote:
> On Thu, Jul 31, 2014 at 3:23 PM, Mark Rutland <[1]mark.rutland@xxxxxxx>
> wrote:
>
> On Thu, Jul 31, 2014 at 09:41:10AM +0100, Ganapatrao Kulkarni wrote:
> > Â ÂOn Wed, Jul 30, 2014 at 9:16 PM, Mark Rutland
> <[1][2]mark.rutland@xxxxxxx>
> > Â Âwrote:
> >
> > Â Â ÂHi,
> > Â Â ÂOn Wed, Jul 30, 2014 at 04:06:31PM +0100, Robert Richter wrote:
> > Â Â Â> From: Radha Mohan Chintakuntla <[2][3]rchintakuntla@xxxxxxxxxx>
> > Â Â Â>
> > Â Â Â> Add initial device tree nodes for Cavium Thunder SoCs with
> support of
> > Â Â Â> 48 cores and gicv3. The dts file requires further changes, esp.
> for
> > Â Â Â> pci, gicv3-its and smmu. This changes will be added later
> together
> > Â Â Â> with the device drivers.
> > Â Â Â>
> > Â Â Â> Signed-off-by: Radha Mohan Chintakuntla
> <[3][4]rchintakuntla@xxxxxxxxxx>
> > Â Â Â> Signed-off-by: Robert Richter <[4][5]rrichter@xxxxxxxxxx>
> > Â Â Â> ---
> >   Â> Âarch/arm64/boot/dts/Makefile     |  1 +
> > Â Â Â> Âarch/arm64/boot/dts/thunder-88xx.dts | 387
> > Â Â Â+++++++++++++++++++++++++++++++++++
> > Â Â Â> Â2 files changed, 388 insertions(+)
> > Â Â Â> Âcreate mode 100644 arch/arm64/boot/dts/thunder-88xx.dts
> > Â Â Â>
> > Â Â Â> diff --git a/arch/arm64/boot/dts/Makefile
> > Â Â Âb/arch/arm64/boot/dts/Makefile
> > Â Â Â> index c52bdb051f66..f8001a62029c 100644
> > Â Â Â> --- a/arch/arm64/boot/dts/Makefile
> > Â Â Â> +++ b/arch/arm64/boot/dts/Makefile
> > Â Â Â> @@ -1,3 +1,4 @@
> > Â Â Â> +dtb-$(CONFIG_ARCH_THUNDER) += thunder-88xx.dtb
> > Â Â Â> Âdtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb
> foundation-v8.dtb
> > Â Â Â> Âdtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
> > Â Â Â>
> > Â Â Â> diff --git a/arch/arm64/boot/dts/thunder-88xx.dts
> > Â Â Âb/arch/arm64/boot/dts/thunder-88xx.dts
> > Â Â Â> new file mode 100644
> > Â Â Â> index 000000000000..4cf20ac9138b
> > Â Â Â> --- /dev/null
> > Â Â Â> +++ b/arch/arm64/boot/dts/thunder-88xx.dts
> > Â Â Â> @@ -0,0 +1,387 @@
> > Â Â Â> +/*
> > Â Â Â> + * Cavium Thunder DTS file
> > Â Â Â> + *
> > Â Â Â> + * Copyright (C) 2013, Cavium Inc.
> > Â Â Â> + *
> > Â Â Â> + * This program is free software; you can redistribute it
> and/or
> > Â Â Â> + * modify it under the terms of the GNU General Public License
> as
> > Â Â Â> + * published by the Free Software Foundation; either version 2
> of
> > Â Â Â> + * the License, or (at your option) any later version.
> > Â Â Â> + */
> > Â Â Â> +/dts-v1/;
> > Â Â Â> +
> > Â Â Â> +/* Reserving first 12MB of DDR for firmware */
> > Â Â Â> +/memreserve/ 0x00000000 0x00c00000;
> >
> > Â Â ÂWhat exactly is this memreserve intended to protect at runtime?
> > Â Â ÂYes, this 12 MB is reserved for ATF and UEFI boot and run-time
> services.
>
> If booted as an EFI application Linux will use the UEFI memory map.
> Anything UEFI needs to have kept around will be marked as such, so
> there's no need to memreserve that.
>
> We are loading ATF and UEFI from flash(which is not XIP) within 12MB of
> DDR.
> ÂI dont see UEFI stub freeing RAM address where UEFIÂ image is loaded.

Therefore we don't need the memreserve, then?

> I was under the impression that the ARM Trusted Firmware didn't need
> anything resident on the non-secure side, so I don't see why that needs
> a memreserve -- Linux should not be able to address anything it has
> resident.
>
> We mark RAM used by ATF as secure-RAM, however we don't support
> secure/non-secure address aliasing.
> i.e, a DRAM address that can be referenced from both a secure PA and a
> non-secure PA is not allowed.

What exactly do you mean by "not allowed"?

If Linux maps that memory, what happens?

What if Linux tried to read or write to it?

If Linux should not map that memory, it should not be described in the
memory map to begin with.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/