9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Mack Wallace <mackbw@mapinternet.com>
To: 9front@9front.org
Subject: [9front] Porting RTL8111 (ether8169) driver to bcm64
Date: Sat, 13 Nov 2021 21:57:30 +0000	[thread overview]
Message-ID: <0100017d1b4e37b3-3803a9cc-799e-4bbc-bd38-539fad5e750c-000000@email.amazonses.com> (raw)

Hi all,

I have a Raspberry Pi Compute Module 4 (CM4) with a DFRobot mini router board (https://www.dfrobot.com/product-2242.html) for which I would like to use the second NIC.

The second NIC is a RTL8111 connected to the Pi through its PCIe interface. 

I’ve looked at the code in front that should support the RTL8111, (ether8169.c,) in the pc directory. For better or worse this driver makes use of inb, outb, ins, outs, inl and outl which are architecture specific to x86. I wasn’t able to find equivalent calls in 9fromt. Trying to find the equivalent calls for arm (bcm64) architecture, I found equivalents in the linux kernel which (after a few wrappers) wrap inline assembly. Looking at the driver from Realtek, they use different calls depending on pre-compiler directives - including the readb/l/w and writeb/l/w calls that wrap the assembly in linux. So I would think this could be done to the ether8169.c driver. 

My questions:

Are there already similar calls in 9front and I’ve (stupidly) overlooked them? 

Should it be as simple as adding the platform dependent calls in the driver to get it to work on the Pi, or is there more work that needs to be done to the bcm64 PCIe interface?


Regards,

mackbw

             reply	other threads:[~2021-11-13 22:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 21:57 Mack Wallace [this message]
2021-11-14  5:31 ` cinap_lenrek
2021-11-14  5:57 ` cinap_lenrek
2021-11-22 22:01   ` Mack Wallace
2021-11-24 11:41     ` cinap_lenrek
2021-12-07 20:41       ` 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=0100017d1b4e37b3-3803a9cc-799e-4bbc-bd38-539fad5e750c-000000@email.amazonses.com \
    --to=mackbw@mapinternet.com \
    --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).