VirtualBox

Changeset 38544 in vbox


Ignore:
Timestamp:
Aug 26, 2011 10:02:44 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73696
Message:

BIOS: Cleaner initial state.

File:
1 edited

Legend:

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

    r38527 r38544  
    1131811318#define LVT1    0xFEE00360
    1131911319
    11320 ;; Program LVT0/LVT1 entries in the local APIC. Some Linux kernels (e.g., RHEL4
    11321 ;; SMP 32-bit) expect the entries to be unmasked in virtual wire mode.
    11322 
    11323 setup_lapic:
     11320;; Run initialization steps which must be performed in protected mode.
     11321;; - Program LVT0/LVT1 entries in the local APIC. Some Linux kernels (e.g., RHEL4
     11322;;   SMP 32-bit) expect the entries to be unmasked in virtual wire mode.
     11323;; - Clear the CD and NW bits in CR0; these are not relevant (except possibly
     11324;;    under AMD-V with nested paging) but the guest should see the right state.
     11325
     11326pmode_setup:
     11327  push eax
     11328  push esi
    1132411329  pushf
    1132511330  cli               ;; Interrupts would kill us!
     
    1133511340  or   ah,  #0x04
    1133611341  mov  [esi], eax
     11342  mov  eax, cr0     ;; Clear CR0.CD and CR0.NW
     11343  and  eax, #0x9fffffff
     11344  mov  cr0, eax
    1133711345  call pmode_exit
    1133811346  popf
     11347  pop  esi
     11348  pop  eax
    1133911349  ret
    1134011350
     
    1146611476
    1146711477  cli
    11468   mov  ax, #0x7700
     11478  mov  ax, #0x7C00
    1146911479  mov  sp, ax
    1147011480  xor  ax, ax
     
    1151811528  call _log_bios_start
    1151911529
     11530  call pmode_setup
     11531
    1152011532  ;; set all interrupts to default handler
    1152111533  xor  bx, bx         ;; offset index
     
    1171211724  call pcibios_init_irqs
    1171311725#endif
    11714   call setup_lapic
    1171511726  call rom_scan
    1171611727
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