您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

select_pci.c 706B

12345678910111213141516171819202122232425262728
  1. #include "dev.h"
  2. #include "pci.h"
  3. #include "registers.h"
  4. /*
  5. * Register a device as the default PCI boot device. This code is
  6. * called by the PCI ROM prefix.
  7. *
  8. * Do not move this code to drivers/bus/pci.c, because it is
  9. * i386-specific, and don't merge it with select_isapnp.c, because
  10. * that would cause linker symbol pollution.
  11. *
  12. */
  13. void i386_select_pci_device ( struct i386_all_regs *regs ) {
  14. /*
  15. * PCI BIOS passes busdevfn in %ax
  16. *
  17. */
  18. union {
  19. struct bus_loc bus_loc;
  20. struct pci_loc pci_loc;
  21. } u;
  22. /* Select PCI bus and specified busdevfn as first boot device */
  23. memset ( &u, 0, sizeof ( u ) );
  24. u.pci_loc.busdevfn = regs->ax;
  25. select_device ( &dev, &pci_driver, &u.bus_loc );
  26. }