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: <CAL_Jsq+4Ea7=WP+mj_k1Q3q7DKm-hk6WXpv2DOBQwefp-zxzjg@mail.gmail.com>
Date:	Fri, 31 Jan 2014 11:38:08 -0600
From:	Rob Herring <robherring2@...il.com>
To:	Michal Simek <michal.simek@...inx.com>
Cc:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Michal Simek <monstr@...str.eu>,
	Josh Cartwright <josh.cartwright@...com>,
	Steffen Trumtrar <s.trumtrar@...gutronix.de>,
	Peter Crosthwaite <peter.crosthwaite@...inx.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: zynq: Reserve not DMAable space in front of the kernel

On Fri, Jan 31, 2014 at 6:08 AM, Michal Simek <michal.simek@...inx.com> wrote:
> Reserve space from 0x0 - __pa(swapper_pg_dir),
> if kernel is loaded from 0, which is not DMAable.
> It is causing problem with MMC driver and others
> which want to add dma buffers to this space.
>
> Signed-off-by: Michal Simek <michal.simek@...inx.com>
> ---
>
> Jason: I don't think it is worth to bring 0x8000 magic
> value and count minimum from it and phys_addr of swapper_pg_dir.
> Full 512k of memory shouldn't be used by DMA.
>
> ---
>  arch/arm/mach-zynq/common.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

The existing DT reserved range can't be used for this purpose?

Rob

>
> diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
> index 1db2a5ca..8c09a83 100644
> --- a/arch/arm/mach-zynq/common.c
> +++ b/arch/arm/mach-zynq/common.c
> @@ -25,6 +25,7 @@
>  #include <linux/of_irq.h>
>  #include <linux/of_platform.h>
>  #include <linux/of.h>
> +#include <linux/memblock.h>
>  #include <linux/irqchip.h>
>  #include <linux/irqchip/arm-gic.h>
>
> @@ -41,6 +42,18 @@
>
>  void __iomem *zynq_scu_base;
>
> +/**
> + * zynq_memory_init - Initialize special memory
> + *
> + * We need to stop things allocating the low memory as DMA can't work in
> + * the 1st 512K of memory.
> + */
> +static void __init zynq_memory_init(void)
> +{
> +       if (!__pa(PAGE_OFFSET))
> +               memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
> +}
> +
>  static struct platform_device zynq_cpuidle_device = {
>         .name = "cpuidle-zynq",
>  };
> @@ -117,5 +130,6 @@ DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
>         .init_machine   = zynq_init_machine,
>         .init_time      = zynq_timer_init,
>         .dt_compat      = zynq_dt_match,
> +       .reserve        = zynq_memory_init,
>         .restart        = zynq_system_reset,
>  MACHINE_END
> --
> 1.8.2.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ