Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2025 07:36:10 +0000
From:      orbit <ordinarybit@proton.me>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>
Subject:   Re: PCI port I/O and memory-mapped I/O
Message-ID:  <_RLIGdUH6esA_h8F7iaur4Qwd5A3MHEj4QinTwr5VLuXf01xRMpLFNWvn8T3DUJz9ZWgueW0KrYQr-dLy3MXrh4zbVaV-6WvcjOY3WHU6r0=@proton.me>
In-Reply-To: <CANCZdfq1_iRyVs35xdqRmZJuCNbbjJg3rFPJvJZ6u1MNW%2BD2pQ@mail.gmail.com>
References:  <_vtzKU0gKbXoYKLmXTU9y_ynlAk6DVRzKKzPlNVAsUMxMzm94uw6o34WU5rQGxlrVMS5VXm-Sm0fnB6L0O94gkd-nWbpDXXJN_vaw0dhuLs=@proton.me> <CANCZdfq1_iRyVs35xdqRmZJuCNbbjJg3rFPJvJZ6u1MNW%2BD2pQ@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wednesday, September 17th, 2025 at 8:37 AM, Warner Losh <imp@bsdimp.com> wrote:

> On Tue, Sep 16, 2025 at 9:26 AM orbit <ordinarybit@proton.me> wrote:
>
>> Hi,
>>
>> I am exploring PCI device driver at the moment were I could see my FreeBSD system having this Intel gigabit NIC detected as shown in the dmesg.
>>
>> em0: <Intel(R) PRO/1000 Legacy Network Connection 1.1.0> port 0xd010-0xd017 mem 0xf0000000-0xf001ffff irq 9 at device 3.0 on pci0
>>
>> Can someone confirm if the "port 0xd010-0xd017" and "mem 0xf0000000-0xf001ffff" pertains respectively to the PCI port I/O space and the PCI memory space being allocated to this Intel network driver upon attachment? If yes, does the Intel network controller chip use these ranges of memory addresses to map its control and status registers? If not, what are the usage of these port and memory address ranges?
>
> Yes. Those are the addresses that the BIOS assigned to them, and that FreeBSD picked up. That's the hardware register file for the network controller.
>
> The actual physical address is typically mapped 1:1 to the PCI Bus address, but sometimes an iommu remaps.

Okay, got it.
[-- Attachment #2 --]
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br><div class="protonmail_quote">
        On Wednesday, September 17th, 2025 at 8:37 AM, Warner Losh &lt;imp@bsdimp.com&gt; wrote:<br>
        <blockquote class="protonmail_quote" type="cite">
            <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Sep 16, 2025 at 9:26 AM orbit &lt;<a href="mailto:ordinarybit@proton.me" rel="noreferrer nofollow noopener">ordinarybit@proton.me</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:Arial,sans-serif;font-size:14px">Hi,</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">I am exploring PCI device driver at the moment were I could see my FreeBSD system having this Intel gigabit NIC detected as shown in the dmesg.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px"><span>em0: &lt;Intel(R) PRO/1000 Legacy Network Connection 1.1.0&gt; port 0xd010-0xd017 mem 0xf0000000-0xf001ffff irq 9 at device 3.0 on pci0</span><br></div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div>
<div style="font-family:Arial,sans-serif;font-size:14px">
    <div>

            </div>

            <div>Can someone confirm if the <span>"port 0xd010-0xd017" and "<span>mem 0xf0000000-0xf001ffff</span>" pertains respectively to the PCI port I/O space and the PCI memory space being allocated to this Intel network driver upon attachment? If yes, does the Intel network controller chip use these ranges of memory addresses to map its control and status registers? If not, what are the usage of these port and memory address ranges?</span></div></div></blockquote><div><br></div><div><font face="Arial, sans-serif">Yes. Those are the addresses that the BIOS assigned to them, and that FreeBSD picked up. That's the hardware register file for the network controller.</font></div><div><font face="Arial, sans-serif"><br></font></div><div><font face="Arial, sans-serif">The actual physical address is typically mapped 1:1 to the PCI Bus address, but sometimes an iommu remaps. </font></div><div><br></div></div></div>

        </blockquote></div><div class="protonmail_quote"><br></div><div class="protonmail_quote">Okay, got it.</div><div class="protonmail_quote"><br>
    </div></div>
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?_RLIGdUH6esA_h8F7iaur4Qwd5A3MHEj4QinTwr5VLuXf01xRMpLFNWvn8T3DUJz9ZWgueW0KrYQr-dLy3MXrh4zbVaV-6WvcjOY3WHU6r0=>