VirtualBox

Changeset 1342 in vbox for trunk


Ignore:
Timestamp:
Mar 8, 2007 5:21:38 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19316
Message:

Zero (almost) all memory below 640K. All commercial BIOS versions
apparently do it, so there may be broken boot loaders out there.

File:
1 edited

Legend:

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

    r1070 r1342  
    1031610316    stosw
    1031710317#else /* VBOX */
    10318   ;; zero out BIOS data area (40:00..40:ff) except word at 40:72
     10318  ;; zero out segment 0 (includes BIOS data area) except word at 40:72
    1031910319  mov es, ax
    10320   mov di, #0x0400
     10320  xor di, di
    1032110321  cld
    10322   mov cx, #0x0039 ;; 57 words
     10322  mov cx, #0x0239 ;; 569 words
    1032310323  rep
    1032410324    stosw
    1032510325  inc di
    1032610326  inc di
    10327   mov cx, #0x0046 ;; 70 words
     10327  mov cx, #0x7dc6 ;; 32198 words
    1032810328  rep
    1032910329    stosw
     10330  ;; zero out remaining base memory
     10331  xor eax, eax
     10332  xor bx, bx
     10333memory_zero_loop:
     10334  add bx, #0x1000
     10335  cmp bx, #0xa000
     10336  jae memory_cleared
     10337  mov es, bx
     10338  xor di, di
     10339  mov cx, #0x4000
     10340  rep
     10341    stosd
     10342  jmp memory_zero_loop
     10343memory_cleared:
     10344  xor bx, bx
    1033010345#endif
    1033110346
Note: See TracChangeset for help on using the changeset viewer.

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