VirtualBox

Changeset 1433 in vbox for trunk/src/VBox/Devices/PC/BIOS


Ignore:
Timestamp:
Mar 12, 2007 6:09:31 PM (18 years ago)
Author:
vboxsync
Message:

Perform software reset of pcnet device(s) in the BIOS. This makes sure no misconfigured busmaster access is performed if the guest reboots
without toggling the reset line (otherwise the device is left running and can destroy memory contents in the descriptors and receive
buffers).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r1427 r1433  
    98529852  cmp  ax, #0xffff
    98539853  jz   next_pci_dev
     9854#ifndef VBOX /* This currently breaks restoring a previously saved state. */
    98549855  mov  dl, #0x04 ;; disable i/o and memory space access
    98559856  call pcibios_init_sel_reg
     
    99029903  mov  byte ptr[bp-8], al
    99039904  jmp  pci_init_io_loop2
     9905#endif /* !VBOX */
    99049906enable_iomem_space:
    99059907  mov  dl, #0x04 ;; enable i/o and memory space access if available
     
    99099911  or   al, #0x07
    99109912  out  dx, al
     9913#ifdef VBOX
     9914  mov  dl, #0x00 ;; check if PCI device is AMD PCNet
     9915  call pcibios_init_sel_reg
     9916  mov  dx, #0x0cfc
     9917  in   eax, dx
     9918  cmp  eax, #0x20001022
     9919  jne  next_pci_dev
     9920  mov  dl, #0x10 ;; get I/O address
     9921  call pcibios_init_sel_reg
     9922  mov  dx, #0x0cfc
     9923  in   ax, dx
     9924  and  ax, #0xfffc
     9925  mov  cx, ax
     9926  mov  dx, cx
     9927  add  dx, #0x14 ;; reset register if PCNet is in word I/O mode
     9928  in   ax, dx    ;; reset is performed by reading the reset register
     9929  mov  dx, cx
     9930  add  dx, #0x18 ;; reset register if PCNet is in word I/O mode
     9931  in   eax, dx   ;; reset is performed by reading the reset register
     9932#endif /* VBOX */
    99119933next_pci_dev:
    99129934  mov  byte ptr[bp-8], #0x10
     
    1059410616  call rombios32_init
    1059510617#else
    10596 #if 0 /* This currently breaks restoring a previously saved state. */
    1059710618  call pcibios_init_iomem_bases
    10598 #endif
    1059910619  call pcibios_init_irqs
    1060010620#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette