All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/9] Rewrite ARMv8 layerscape MMU
Date: Mon, 13 Feb 2017 19:45:27 -0800	[thread overview]
Message-ID: <1487043936-10112-1-git-send-email-york.sun@nxp.com> (raw)

A recent debug revealed MMU for DDR shouldn't be enabled before
DDR is initialized. Otherwise, a "normal memory" mapping may cause
speculative access which may hang the system if accessing to DDR
is not allowed at time.  For Layerscape platforms, we have early
MMU setup to speed up execution on emulators. The solution is to
update MMU after DDR is ready. The same idea goes to final MMU as
well. Actual DDR size is used to create the mappings. Non-exist
address should be marked as "fault", i.e. invalid to avoid unwanted
speculative access.

Aside from the DDR size, reserved memory used for secure RAM and
Management Complex (MC) makes things more complicated. To simplify
it, a new global is added to track the reserved RAM. Secure RAM
is excluded from U-Boot MMU. The reserved RAM is still mapped
under U-Boot since we will need to copy data into it. Reserved
RAM is excluded when device tree is fixed up so OS won't see it.

Some MC configurations are moved to Kconfig.


York Sun (9):
  armv8: Add global variable resv_ram
  armv8: ls2080a: Move CONFIG_FSL_MC_ENET to Kconfig
  armv8: ls2080a: Move CONFIG_SYS_MC_RSV_MEM_ALIGN to Kconfig
  armv8: layerscape: Rewrite memory reservation
  driver: net: fsl-mc: Update calculation of MC RAM
  armv8: layerscape: Update MMU mapping with actual DDR size
  armv8: layerscape: Flush MMU tables after creattion
  armv8: mmu: Add a function to change mapping attributes
  armv8: layerscape: Update early MMU for DDR after initialization

 arch/arm/cpu/armv8/cache_v8.c                     |  72 +++++-
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig         |  22 ++
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c           | 292 +++++++++++++++++++++-
 arch/arm/include/asm/arch-fsl-layerscape/config.h |   4 +-
 arch/arm/include/asm/arch-fsl-layerscape/cpu.h    |  12 +-
 arch/arm/include/asm/arch-fsl-layerscape/mmu.h    |   2 +-
 arch/arm/include/asm/armv8/mmu.h                  |   5 +
 arch/arm/include/asm/global_data.h                |   3 +
 arch/arm/include/asm/system.h                     |   1 +
 board/freescale/ls1012afrdm/ls1012afrdm.c         |  34 +--
 board/freescale/ls1012aqds/ls1012aqds.c           |  34 +--
 board/freescale/ls1012ardb/ls1012ardb.c           |  34 +--
 board/freescale/ls1043aqds/ddr.c                  |  29 ---
 board/freescale/ls1043aqds/ls1043aqds.c           |   5 +
 board/freescale/ls1043ardb/ddr.c                  |  29 ---
 board/freescale/ls1043ardb/ls1043ardb.c           |   7 -
 board/freescale/ls1046aqds/ddr.c                  |  29 ---
 board/freescale/ls1046aqds/ls1046aqds.c           |   5 +
 board/freescale/ls1046ardb/ddr.c                  |  29 ---
 board/freescale/ls1046ardb/ls1046ardb.c           |   7 -
 board/freescale/ls2080a/ddr.c                     |  55 ----
 board/freescale/ls2080a/ls2080a.c                 |  17 +-
 board/freescale/ls2080aqds/ddr.c                  |  55 ----
 board/freescale/ls2080aqds/ls2080aqds.c           |  17 +-
 board/freescale/ls2080ardb/ddr.c                  |  55 ----
 board/freescale/ls2080ardb/ls2080ardb.c           |  18 +-
 cmd/bdinfo.c                                      |   4 +
 common/board_f.c                                  |  32 +--
 drivers/net/fsl-mc/mc.c                           |  75 +-----
 include/configs/ls2080a_common.h                  |   2 -
 scripts/config_whitelist.txt                      |   2 -
 31 files changed, 473 insertions(+), 514 deletions(-)

-- 
2.7.4

             reply	other threads:[~2017-02-14  3:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  3:45 York Sun [this message]
2017-02-14  3:45 ` [U-Boot] [PATCH 1/9] armv8: Add global variable resv_ram York Sun
2017-02-14  3:45 ` [U-Boot] [PATCH 2/9] armv8: ls2080a: Move CONFIG_FSL_MC_ENET to Kconfig York Sun
2017-02-14  3:45 ` [U-Boot] [PATCH 3/9] armv8: ls2080a: Move CONFIG_SYS_MC_RSV_MEM_ALIGN " York Sun
2017-02-14  3:45 ` [U-Boot] [PATCH 4/9] armv8: layerscape: Rewrite memory reservation York Sun
2017-02-14 15:31   ` Alexander Graf
2017-02-14 17:00     ` york sun
     [not found]     ` <320b0ef7-c2eb-014a-b9f8-9ac538c30c3c@nxp.com>
2017-02-14 17:38       ` york sun
2017-02-14 19:55         ` Alexander Graf
2017-02-14 22:33           ` york sun
2017-02-15 18:52           ` york sun
2017-02-15 22:01             ` Alexander Graf
2017-02-14  3:45 ` [U-Boot] [PATCH 5/9] driver: net: fsl-mc: Update calculation of MC RAM York Sun
2017-02-14  3:45 ` [U-Boot] [PATCH 6/9] armv8: layerscape: Update MMU mapping with actual DDR size York Sun
2017-02-14  3:45 ` [U-Boot] [PATCH 7/9] armv8: layerscape: Flush MMU tables after creattion York Sun
2017-02-14  3:45 ` [U-Boot] [PATCH 8/9] armv8: mmu: Add a function to change mapping attributes York Sun
2017-02-14 15:39   ` Alexander Graf
2017-02-14 16:44     ` york sun
2017-02-14  3:45 ` [U-Boot] [PATCH 9/9] armv8: layerscape: Update early MMU for DDR after initialization York Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487043936-10112-1-git-send-email-york.sun@nxp.com \
    --to=york.sun@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.