All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] PCIE_MEM_BUS for Freescale SoC
Date: Sat, 21 Nov 2015 14:55:32 -0800	[thread overview]
Message-ID: <5650F664.2010603@freescale.com> (raw)

Roy,

Do you remember the reason why we use different virtual memory address from pci
bus address with 36-bit? For example

include/configs/P1022DS.h-496-#define CONFIG_SYS_PCIE1_MEM_VIRT 0xc0000000
include/configs/P1022DS.h-497-#ifdef CONFIG_PHYS_64BIT
include/configs/P1022DS.h:498:#define CONFIG_SYS_PCIE1_MEM_BUS  0xe0000000
include/configs/P1022DS.h-499-#define CONFIG_SYS_PCIE1_MEM_PHYS 0xc40000000ull
include/configs/P1022DS.h-500-#else
include/configs/P1022DS.h:501:#define CONFIG_SYS_PCIE1_MEM_BUS  0xc0000000
include/configs/P1022DS.h-502-#define CONFIG_SYS_PCIE1_MEM_PHYS 0xc0000000
include/configs/P1022DS.h-503-#endif

As far as I can tell, the following is the mapping

TLB: MEM_VIRT=>MEM_PHYS
PCI: MEM_BUS=>MEM_PHYS
LAW: MEM_PHYS=>pcie interface

Being different for MEM_VIRT and MEM_BUS cause confusion. When I run "pci
header" command to show the BARs, I expect I can use "md" to access the BAR
address. That's not the case if MEM_BUS is different from MEM_VIRT.

I forget why we did this for 36-bit addressing. The MEM_VIRT is the same as
MEM_BUS for 32-bit addressing. And why do we use the same MEM_BUS address for
all PCIe hose? I know they are not conflicting, but is it necessary?

Let me know if you have any concerns. Otherwise I will change all platforms to
use consistent addresses.

York

             reply	other threads:[~2015-11-21 22:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21 22:55 York Sun [this message]
2015-11-21 23:29 ` [U-Boot] PCIE_MEM_BUS for Freescale SoC York Sun
2015-11-23 16:24   ` Scott Wood
2015-11-23 17:00     ` York Sun
2015-11-23 17:07       ` Scott Wood
2015-11-23 17:11         ` York Sun
2015-11-23 19:56         ` 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=5650F664.2010603@freescale.com \
    --to=yorksun@freescale.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.