Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
soc:2008:mdeck:notes:initialization [2008/05/28 16:39]
mdeck created
soc:2008:mdeck:notes:initialization [2008/05/30 04:37] (current)
mdeck
Line 15: Line 15:
 ''​register_netdev()''​ adds to the device list.\\ ​ ''​register_netdev()''​ adds to the device list.\\ ​
 We return up the call stack to main(). We return up the call stack to main().
-===== Reaching ​open =====+===== Reaching ​close =====
   * src/​core/​main.c >> ''​main()''​   * src/​core/​main.c >> ''​main()''​
   * src/​usr/​autoboot.c >> ''​autoboot()''​ -- Boot network devices sequentially.   * src/​usr/​autoboot.c >> ''​autoboot()''​ -- Boot network devices sequentially.
 +  * src/​usr/​autoboot.c >> ''​close_all_netdevs()''​
 +  * src/​usr/​ifmgmt.c >> ''​ifclose()''​
 +  * src/​net/​netdevice.c >> ''​netdev_close()''​
 +  * ''​%%{struct net_device}->​op->​close()%%''​ == src/​drivers/​net/​NAME.c >> ''​NAME_close()''​ -- The network driver'​s ''​close()''​ routine is reached.
 +All network devices are closed before attempting to boot each network device.\\ ​
 +We return up the call stack to autoboot().
 +===== Reaching open =====
 +  * src/​usr/​autoboot.c >> ''​autoboot()''​ -- Still booting network devices sequentially.
   * src/​usr/​autoboot.c >> ''​netboot()''​ -- Boot this network device   * src/​usr/​autoboot.c >> ''​netboot()''​ -- Boot this network device
   * src/​usr/​ifmgmt.c >> ''​ifopen()''​   * src/​usr/​ifmgmt.c >> ''​ifopen()''​
-  * src/​net/​netdevice.c >> ''​netdev_open()'' ​-- The network driver'​s ''​open()''​ routine is reached. +  * src/​net/​netdevice.c >> ''​netdev_open()''​ 
-  * ''​%%{struct net_device}->​op->​open()%%''​ == src/​drivers/​net/​NAME.c >> ''​NAME_open()''​+  * ''​%%{struct net_device}->​op->​open()%%''​ == src/​drivers/​net/​NAME.c >> ''​NAME_open()'' ​-- The network driver'​s ''​open()''​ routine is reached.
 At this point transmit and receive are enabled. At this point transmit and receive are enabled.
 +
 ===== root_device and pci_device structs ===== ===== root_device and pci_device structs =====
 Both ''​struct root_device''​ and ''​struct pci_device''​ have a special function in gPXE.  Bus drivers are ''​root_device''​s,​ thus there is one for PCI, ISA, etc.  PCI devices are self-explanatory. ​ Both ''​root_device''​ and ''​pci_device''​ structs are defined within their respective driver code.  These structs hold function pointers to essential interface routines, such as ''​probe()''​ and ''​remove()''​. ​ The ''​%%__pci_driver%%''​ and ''​%%__root_driver%%''​ tags cause the drivers to be added to a list of modules, resulting in their ''​probe()''​ routines being called during initialization. Both ''​struct root_device''​ and ''​struct pci_device''​ have a special function in gPXE.  Bus drivers are ''​root_device''​s,​ thus there is one for PCI, ISA, etc.  PCI devices are self-explanatory. ​ Both ''​root_device''​ and ''​pci_device''​ structs are defined within their respective driver code.  These structs hold function pointers to essential interface routines, such as ''​probe()''​ and ''​remove()''​. ​ The ''​%%__pci_driver%%''​ and ''​%%__root_driver%%''​ tags cause the drivers to be added to a list of modules, resulting in their ''​probe()''​ routines being called during initialization.

Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code soc:2008:mdeck:notes:initialization (generated for current page)