9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] 9front on Raspberry Pi 400
Date: Wed, 27 Jan 2021 18:57:48 +0100	[thread overview]
Message-ID: <2B36CF440E98DA3D5E8A94B83AC9CF65@felloff.net> (raw)
In-Reply-To: <0100017741afd09d-da43b097-8dba-46b2-98d9-05414e118708-000000@email.amazonses.com>

ok, so it seems on the CM4 and PI400 with newer firmware, they changed
the pcie inbound window address space. which is the range of addresses
as seen from a pci device perspecive doing busmaster dma towards memory
on the host system.

this also means we need to configure the inbound windows differently
in the pcie controller and also that drivers offset physical memory
addresses by that window base when passing them to pci devices for dma.

this is done by the PCIWADDR() macro, which currently just translates
to physical address and then adds PCIWINDOW constant, which in the
previous address scheme was 0 (no translation).

so the problem is likely that the xhcireset firmware call places the
firmware image somewhere in memory, and then the xhci controller is
not able to reach it because we assume a "no translation" regime in the
pcie controller. also the window we program is currently limited to
1GB so not all dma memory can be targeted, but this was not a problem
as we only do dma to kernel memory and the kernel memory pool fits in
that range.

to top it off, all this garbage is communicated thru devicetree blobs,
which we only partially support at this point. (mainly just to get
the sdram memory sizes and boot arguments).

i can work on this and might have something for you to test in a
couple of days.

--
cinap

  parent reply	other threads:[~2021-01-27 18:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 17:23 Mack Wallace
2021-01-23 16:11 ` cinap_lenrek
2021-01-23 21:08   ` Mack Wallace
2021-01-23 21:13   ` Mack Wallace
2021-01-23 23:42     ` cinap_lenrek
2021-01-24 15:01       ` cinap_lenrek
2021-01-26  3:33         ` Mack Wallace
2021-01-26  3:35         ` Mack Wallace
2021-01-26 11:21           ` cinap_lenrek
2021-01-26 12:09           ` cinap_lenrek
2021-01-27  2:32             ` Mack Wallace
2021-01-27 14:30               ` cinap_lenrek
2021-01-27 17:04               ` cinap_lenrek
2021-01-27 17:57               ` cinap_lenrek [this message]
2021-01-29 14:58               ` cinap_lenrek
2021-01-30  2:43                 ` Mack Wallace
2021-01-30  5:54                   ` cinap_lenrek
2021-01-30 19:23                     ` Mack Wallace
2021-01-30 19:41                       ` cinap_lenrek
2021-01-30 19:46                       ` cinap_lenrek
2021-02-01  1:16                         ` Mack Wallace

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=2B36CF440E98DA3D5E8A94B83AC9CF65@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9front@9front.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).