Reputation: 8610
I just have started reading Device Driver and read Start_kernal function is part of architecture-independent code and has invoked from architecture-dependent part .I wanted to know what actully happens before this start_Kernal routine has called mean to say at booting of kernal.
I'm interested in knowing what happens when newtork device or a USB device interacts with this architecture-dependent code(believe architecture-dependen is first piece of software interact with hardware ).
Is architecture-dependent code is responsibe for fetching information like mac address ,vendor id etc of hardware device attached to system?.
Upvotes: 0
Views: 134
Reputation: 17047
The early kernel code is focused on:
Note that architecture-dependent initialization does not happen all at once. A board initialization function can be invoked after the kernel has started but before drivers are initialized.
newtork device or a USB device interacts with this architecture-dependent code
Network and USB host & gadget devices are represented by device drivers that are initialized much later than that early kernel code. The "interaction" is minimal, and would conform to the established kernel-driver interface. A device driver should be written to remove all board-specific dependencies, and replace them with configuration options. If not, then that driver code should be in the platform or mach source code directory rather than in the drivers directory.
Is architecture-dependent code is responsibe for fetching information like ...
The MAC address can be passed in the kernel command line, or installed by a bootloader (for retrieval by the device driver).
Vendor ID, board ID and other data can be architecture-dependent code. For ARM, the kernel receives this information in a memory buffer with ATAGs.
Upvotes: 1