用户工具

站点工具


jaysnote:platform

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

jaysnote:platform [2019/04/29 15:33]
jaylee 创建
jaysnote:platform [2019/04/29 15:51] (当前版本)
jaylee
行 65: 行 65:
 ``` ```
  
-The general rule is to register only those devices that actually exist, +The general rule is to register only those devices that actually exist, but in some cases extra devices might be registered. ​ For example, a kernel might be configured to work with an external network adapter that might not be populated on all boards, or likewise to work with an integrated controller that some boards might not hook up to any peripherals.
-but in some cases extra devices might be registered. ​ For example, a kernel might be configured to work with an external network adapter that might not be populated on all boards, or likewise to work with an integrated controller that some boards might not hook up to any peripherals.+
  
 In some cases, boot firmware will export tables describing the devices that are populated on a given board. ​  ​Without such tables, often the only way for system setup code to set up the correct devices is to build a kernel for a specific target board. ​ Such board-specific kernels are common with embedded and custom systems development. In some cases, boot firmware will export tables describing the devices that are populated on a given board. ​  ​Without such tables, often the only way for system setup code to set up the correct devices is to build a kernel for a specific target board. ​ Such board-specific kernels are common with embedded and custom systems development.
行 80: 行 79:
 The only "​good"​ reason for this is to handle older system designs which, like original IBM PCs, rely on error-prone "​probe-the-hardware"​ models for hardware configuration. ​ Newer systems have largely abandoned that model, in favor of bus-level support for dynamic configuration (PCI, USB), or device tables provided by the boot firmware (e.g. PNPACPI on x86).  There are too many conflicting options about what might be where, and even educated guesses by an operating system will be wrong often enough to make trouble. The only "​good"​ reason for this is to handle older system designs which, like original IBM PCs, rely on error-prone "​probe-the-hardware"​ models for hardware configuration. ​ Newer systems have largely abandoned that model, in favor of bus-level support for dynamic configuration (PCI, USB), or device tables provided by the boot firmware (e.g. PNPACPI on x86).  There are too many conflicting options about what might be where, and even educated guesses by an operating system will be wrong often enough to make trouble.
  
-This style of driver is discouraged. ​ If you're updating such a driver, +This style of driver is discouraged. ​ If you're updating such a driver,​please try to move the device enumeration to a more appropriate location,​outside the driver. ​ This will usually be cleanup, since such drivers tend to already have "​normal"​ modes, such as ones using device nodes that were created by PNP or by platform device setup.
-please try to move the device enumeration to a more appropriate location, +
-outside the driver. ​ This will usually be cleanup, since such drivers tend to already have "​normal"​ modes, such as ones using device nodes that were created by PNP or by platform device setup.+
  
 None the less, there are some APIs to support such legacy drivers. ​ Avoid using these calls except with such hotplug-deficient drivers. None the less, there are some APIs to support such legacy drivers. ​ Avoid using these calls except with such hotplug-deficient drivers.
行 114: 行 111:
 ``` ```
  
-These are concatenated,​ so name/id "​serial"/​0 indicates bus_id "​serial.0",​ and +These are concatenated,​ so name/id "​serial"/​0 indicates bus_id "​serial.0",​ and "​serial/​3"​ indicates bus_id "​serial.3";​ both would use the platform_driver named "​serial"​. ​ While "​my_rtc"/​-1 would be bus_id "​my_rtc"​ (no instance id)
-"​serial/​3"​ indicates bus_id "​serial.3";​ both would use the platform_driver named "​serial"​. ​ While "​my_rtc"/​-1 would be bus_id "​my_rtc"​ (no instance id)+
 and use the platform_driver called "​my_rtc"​. and use the platform_driver called "​my_rtc"​.
  
jaysnote/platform.txt · 最后更改: 2019/04/29 15:51 由 jaylee