linux – 内核参数“console”和“earlycon”是指旧硬件?

weixin_38072417 2019-09-12 01:45:14
我首先通过调查earlycon的参数找到了这个,但发现控制台的选项看起来几乎相同.两者都在下面,取自this来源: 从控制台文档我们有: 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驱动程序可以适当地配置硬件?
...全文
947 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38078374 2019-09-12
  • 打赏
  • 举报
回复
我确信有人仍在这样做,但是在ILO / DRAC等之前的日子里.变得便宜,ubiquitios是在紧急情况下通过串行端口进行“带外”访问控制台的最佳方式.您可以在机架中安装终端服务器,然后将电缆连接到服务器的串行端口.某些BIOS支持将控制台重定向到串行端口(例如,1999年时间帧中的VA Linux和SuperMicro服务器). 8250/16550 UARTS是当时最流行的串口芯片,这意味着它们将是Linux下最好的支持,并且它们都使用8250内核驱动程序(该系列中还有更多的型号都使用过同一个司机). 我怀疑许多旨在被Linux使用的SoC设计构建了8250/16550兼容的UART,因为它是简单的按钮 – 记录良好且经过良好测试的驱动程序.虽然希望他们构建后来的多字节缓冲版本(当然,即使是“慢”处理器,今天的标准也可以比115k串口接收它更频繁地服务串行中断.IIRC Mac有一个用于本地/ Apple Talk的串口(不记得哪个是协议,哪个是硬件)做了248k.但是,当CPU达到60Mhz时,这又回来了. 这可能是MMIO和端口I / O之间差异的最佳答案:https://en.wikipedia.org/wiki/Memory-mapped_I/O我不明白这个级别是否足以将其降低. 上面的链接可能会回答用于这些目的的内容,但基本上它是一个内存地址.
Linux内核一直是学习的难点:将近3000万行代码,5万多个源文件,代码庞大繁杂、代码很难看懂。《Linux内核编程》将突破以往传统的学习方式,采取更有效和科学的学习方法,多角度地对内核进行多层次分析,不局限于形式,不拘泥细节,目的只有一个:更轻松、更高效地去理解内核、学习内核。为了更好地让学员掌握内核编程技能,更好地理解内核,本课程将采用并不局限于以下学习方法进行课程的录制:降维分析,化简为繁,将复杂的系统简单化用软件工程的方法分析内核:软件分层、模块化分解、框架迭代多角度立体分析Linux内核,目的只有一个:更好地理解内核利用Linux内核中的面向对象编程思想去分析复杂的子系统、子系统交互利用多任务编程的思想去分析Linux内核本套课程预计分为20个左右的小模块,每个模块一个专题,每个专题会陆续发布。拟录制的模块包括但不限于:模块机制、内核裁剪与配置、内核编译与启动、系统调用、中断、文件系统、调度、内存管理、内核同步、设备模型、字符驱动、块驱动、定时器、input、platform设备驱动、device tree、proc、sysfs、I/O...  本课程是《Linux内核编程》的入门篇,主要给大家介绍一下Linux内核开发、Linux驱动开发的就业行情、行业生态、需要掌握哪些技能、Linux内核的学习方法、如何搭建Linux内核的学习开发环境。 

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧