カーネルパラメータ "console"と "earlycon"は古いハードウェアを参照していますか?

カーネルパラメータ

最初はパラメータを調べてこれを見つけましたearlyconが、見つかったオプションはconsoleほぼ同じように見えました。どちらも以下に示されており、以下から抜粋した。これ源泉:

私たちが持っている文書からconsole

console=    [KNL] Output console device and options.

    tty<n>  Use the virtual console device <n>.

    ttyS<n>[,options]
    ttyUSB0[,options]
        Use the specified serial port.  The options are of
        the form "bbbbpnf", where "bbbb" is the baud rate,
        "p" is parity ("n", "o", or "e"), "n" is number of
        bits, and "f" is flow control ("r" for RTS or
        omit it).  Default is "9600n8".

        See Documentation/serial-console.txt for more
        information.  See
        Documentation/networking/netconsole.txt for an
        alternative.

    uart[8250],io,<addr>[,options]
    uart[8250],mmio,<addr>[,options]
    uart[8250],mmio16,<addr>[,options]
    uart[8250],mmio32,<addr>[,options]
    uart[8250],0x<addr>[,options]
        Start an early, polled-mode console on the 8250/16550
        UART at the specified I/O port or MMIO address,
        switching to the matching ttyS device later.
        MMIO inter-register address stride is either 8-bit
        (mmio), 16-bit (mmio16), or 32-bit (mmio32).
        If none of [io|mmio|mmio16|mmio32], <addr> is assumed
        to be equivalent to 'mmio'. 'options' are specified in
        the same format described for ttyS above; if unspecified,
        the h/w is not re-initialized.

    hvc<n>  Use the hypervisor console device <n>. This is for
        both Xen and PowerPC hypervisors.

            If the device connected to the port is not a TTY but a braille
            device, prepend "brl," before the device type, for instance
        console=brl,ttyS0
    For now, only VisioBraille is supported.

私たちが持っている文書からearlycon

earlycon=   [KNL] Output early console device and options.

        When used with no options, the early console is
        determined by the stdout-path property in device
        tree's chosen node.

    cdns,<addr>
        Start an early, polled-mode console on a cadence serial
        port at the specified address. The cadence serial port
        must already be setup and configured. Options are not
        yet supported.

    uart[8250],io,<addr>[,options]
    uart[8250],mmio,<addr>[,options]
    uart[8250],mmio32,<addr>[,options]
    uart[8250],mmio32be,<addr>[,options]
    uart[8250],0x<addr>[,options]
        Start an early, polled-mode console on the 8250/16550
        UART at the specified I/O port or MMIO address.
        MMIO inter-register address stride is either 8-bit
        (mmio) or 32-bit (mmio32 or mmio32be).
        If none of [io|mmio|mmio32|mmio32be], <addr> is assumed
        to be equivalent to 'mmio'. 'options' are specified
        in the same format described for "console=ttyS<n>"; if
        unspecified, the h/w is not initialized.

    pl011,<addr>
    pl011,mmio32,<addr>
        Start an early, polled-mode console on a pl011 serial
        port at the specified address. The pl011 serial port
        must already be setup and configured. Options are not
        yet supported.  If 'mmio32' is specified, then only
        the driver will use only 32-bit accessors to read/write
        the device registers.

    meson,<addr>
        Start an early, polled-mode console on a meson serial
        port at the specified address. The serial port must
        already be setup and configured. Options are not yet
        supported.

    msm_serial,<addr>
        Start an early, polled-mode console on an msm serial
        port at the specified address. The serial port
        must already be setup and configured. Options are not
        yet supported.

    msm_serial_dm,<addr>
        Start an early, polled-mode console on an msm serial
        dm port at the specified address. The serial port
        must already be setup and configured. Options are not
        yet supported.

    smh Use ARM semihosting calls for early console.

    s3c2410,<addr>
    s3c2412,<addr>
    s3c2440,<addr>
    s3c6400,<addr>
    s5pv210,<addr>
    exynos4210,<addr>
        Use early console provided by serial driver available
        on Samsung SoCs, requires selecting proper type and
        a correct base address of the selected UART port. The
        serial port must already be setup and configured.
        Options are not yet supported.

    lpuart,<addr>
    lpuart32,<addr>
        Use early console provided by Freescale LP UART driver
        found on Freescale Vybrid and QorIQ LS1021A processors.
        A valid base address must be provided, and the serial
        port must already be setup and configured.

    armada3700_uart,<addr>
        Start an early, polled-mode console on the
        Armada 3700 serial port at the specified
        address. The serial port must already be setup
        and configured. Options are not yet supported.

使用例は次のとおりです。

earlycon=uart8250,0x21c0500

私の質問は次のとおりです

  • なぜ参照がありますか?8250/16550物理ハードウェア?この古い実装は、現代のデザインのインターフェイス仕様に統合されていますか?つまり、これらの通信デバイスがSoCの外部にあるときに互換性のあるUARTドライバを使用していますか?

  • MMIOがある場合メモリマップされたIO、この文脈で「正常」IOは何を意味しますか。

  • パラメータは何ですか<addr>?これは、このコアを実行している特定のSoCのUART構成レジスタの開始ですか?ほとんどのUART設定レジスタは、通常のUARTドライバがハードウェアを正しく設定できるように、特定のレジスタレイアウトに準拠していますか?

ベストアンサー1

まだこのようなことをする人々がいると確信しています。しかし、ILO/DRAC/など以前の頃にさかのぼります。価格が安くなり一般化し、緊急事態や予期しない状況で「帯域外」コンソールにアクセスする最良の方法は、シリアルポートを介することです。ラックにターミナルサーバーを取り付け、ケーブルをサーバーのシリアルポートに接続できます。一部のBIOSはシリアルポートへのコンソールリダイレクトをサポートしています(たとえば、1999年以上の時間範囲のVA LinuxおよびSuperMicroサーバー)。

8250/16550 UARTSは当時最も人気のあるシリアルチップの1つで、これはLinuxで最もよくサポートされていることを意味し、すべて8250カーネルドライバを使用しました(8250カーネルドライバを使用するシリーズにはより多くのモデルがありました))同じドライバ) 。

私はLinux用に意図された多くのSoC設計に8250/16550準拠のUARTが組み込まれていると思います。なぜなら、UARTはシンプルなプッシュボタンだからです。よく文書化されている素晴らしいテストされたドライバ。マルチバイトバッファを含む最新バージョンを構築してほしいと思いましたが(もちろん、今日の標準によると、「遅い」プロセッサでも115kシリアルポートが受信できるよりも頻繁にシリアル割り込みを処理できます)。 IIRC Macには、248k速度のローカル/ Apple Talk(プロトコルとハードウェアが何であるかを覚えていません)用のシリアルポートがあります。しかし、それはCPUが60MHzにクロックされたときでした。

これはおそらくMMIOとポートI / Oの違いに対する最良の答えです。https://en.wikipedia.org/wiki/Memory-mapped_I/Oこれほど要約するほど、このレベルをよく理解していません。

上記のリンクはこれらの目的が何であるかを答えますが、デフォルトではこれはメモリアドレスです。

おすすめ記事