VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/BIOS-new/notes.txt@ 39340

最後變更 在這個檔案從39340是 39340,由 vboxsync 提交於 13 年 前

Started refactoring disk support.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 3.1 KB
 
1
2 Notes on BIOS usage
3 -------------------
4
5- DOS (including 6.22/7.1) does not need INT 15h or INT 1Ah. Most other
6 operating systems require INT 15h to detect installed memory.
7
8- OS/2 (WSeB/MCP/ACP) appears to be one of the very few operating systems
9 which use the El Torito floppy emulation.
10
11- MS-DOS 6.2/V is a rare user of the INT 15h keyboard intercept routines.
12
13- Some software uses the model byte at F000:FFFE to determine the system
14 type (PC-DOS 3.0, Norton Utilities 8). Other software first tries INT 15h,
15 fn C0h instead (PC-DOS 3.1, MSD).
16
17- DOS 4.01 (both IBM and Microsoft) calls INT 13h to read from disk with less
18 than 100 bytes of stack space early in the boot sequence.
19
20- Very few guests use the 32-bit BIOS interface. One is OS/2 (but falls back),
21 another is Etherboot.
22
23- OS/2 is the only known guest which can run the 16-bit PCI BIOS in protected
24 mode (but only if the 32-bit PCI BIOS is unavailable).
25
26- Any disk reads which use bus-master DMA (AHCI, IDE BM) must use VDS
27 (Virtual DMA Services) when present. Otherwise any reads/writes when the
28 real mode addresses don't map directly to physical addresses will fail
29 horribly. DOS 6.x with EMM386 is a good testcase (esp. loading drivers
30 into UMBs).
31
32- Many older OSes (especially UNIX based) require the FDPT to contain
33 physical ATA disk geometry; for that reason, disks smaller than ~500MB are
34 easiest to use. Otherwise a "large" BIOS disk option would be required.
35
36- Some really old OSes (Xenix circa 1986-7) do not understand the EBDA idea
37 and clear the memory. For those, the FDPT must be in the BIOS ROM area, or
38 the OS will destroy it (even when it's at 0:300 in the IVT).
39
40
41 Notes on BIOS implementation
42 ----------------------------
43
44- To return values from functions not declared as __interrupt, the arguments
45 may need to be declared volatile (not ideal, but does the job).
46
47- The way the POST code selectively clears or doesn't clear memory
48 is extremely suspect and will need reworking.
49
50- Need to review string routines wrt direction flag (should be OK now).
51
52- Need to review CMOS access wrt interrupts (possible index reg change by
53 an interrupt handler).
54
55- The POST code zeroes the entire BDA, and then various bits zero specific
56 parts of the BDA again. That's a waste of time.
57
58- After a reset, all interrupts are unmasked. Not sure if that's OK.
59
60- BCC mishandles the following (where buf is an uint8_t array):
61 lba=buf[0x2B]*0x1000000+buf[0x2A]*0x10000+buf[0x29]*0x100+buf[0x28];
62 The buf[x]*100 expression should end up being of type signed int, which
63 causes the sign to be incorrectly propagated. BCC incorrectly keeps
64 the type unsigned.
65
66
67
68 Code size notes (code as of 7/6/2011):
69
70 The following values are the size of the _TEXT segment, i.e. only C code;
71data defined in C is not included, neither are assembly modules.
72
73 Options: Size (hex):
74 -------- -----------
75 -0 -zu -s -oas -ecc 631A
76 -3 -zu -s -oas -ecc 5C1E
77 -0 -zu -s -oas 578A
78 -3 -zu -s -oas 5452
79
80 Both generating 386 code and using register-based calling convention for
81internal functions brings significant size savings (15% when combined).
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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