VirtualBox

Changeset 1070 in vbox


Ignore:
Timestamp:
Feb 27, 2007 9:48:48 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18947
Message:

Hack up a simple warm boot implementation and use it for int19 reboots
from booted operating systems.

Location:
trunk/src/VBox/Devices/PC
Files:
2 edited

Legend:

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

    r985 r1070  
    18501850{
    18511851#ifdef VBOX
     1852  // Skip the logo if a warm boot is requested.
     1853  Bit16u warm_boot = read_word(0x0040,0x0072);
     1854  write_word(0x0040,0x0072, 0);
     1855  if (warm_boot == 0x1234)
     1856    return;
    18521857#ifndef DEBUG
    18531858  /* show graphical logo */
     
    85308535;----------
    85318536int19_relocated: ;; Boot function, relocated
     8537
     8538#ifdef VBOX
     8539  // If an already booted OS calls int 0x19 to reboot, it is not sufficient
     8540  // just to try booting from the configured drives. All BIOS variables and
     8541  // interrupt vectors need to be reset, otherwise strange things may happen.
     8542  // The approach used is faking a warm reboot (which just skips showing the
     8543  // logo), which is a bit more than what we need, but hey, it's fast.
     8544  mov bp, sp
     8545  mov ax, 2[bp]
     8546  cmp ax, #0xf000
     8547  jz bios_initiated_boot
     8548  xor ax, ax
     8549  mov ds, ax
     8550  mov ax, #0x1234
     8551  mov 0x472, ax
     8552  jmp post
     8553bios_initiated_boot:
     8554#endif /* VBOX */
    85328555
    85338556  ;; int19 was beginning to be really complex, so now it
     
    1028410307  mov  ss, ax
    1028510308
     10309#ifndef VBOX
    1028610310  ;; zero out BIOS data area (40:00..40:ff)
    1028710311  mov  es, ax
     
    1029110315  rep
    1029210316    stosw
     10317#else /* VBOX */
     10318  ;; zero out BIOS data area (40:00..40:ff) except word at 40:72
     10319  mov es, ax
     10320  mov di, #0x0400
     10321  cld
     10322  mov cx, #0x0039 ;; 57 words
     10323  rep
     10324    stosw
     10325  inc di
     10326  inc di
     10327  mov cx, #0x0046 ;; 70 words
     10328  rep
     10329    stosw
     10330#endif
    1029310331
    1029410332  call _log_bios_start
     
    1032110359  ;;   zerod out above
    1032210360
     10361#ifndef VBOX
    1032310362  ;; Warm Boot Flag 0040:0072
    1032410363  ;;   value of 1234h = skip memory checks
    1032510364  ;;   zerod out above
     10365#endif /* !VBOX */
    1032610366
    1032710367
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r1066 r1070  
    698698    }
    699699#endif
     700
     701    /* Force a BIOS cold boot after a reset. */
     702    uint16_t *pu16WarmBoot = (uint16_t *)MMPhysGCPhys2HCVirt(pVM, 0x00000472, 2);
     703    AssertRelease(pu16WarmBoot);
     704    *pu16WarmBoot = 0;
    700705}
    701706
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