VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/BIOS/pcibio32.asm@ 69498

Last change on this file since 69498 was 69498, checked in by vboxsync, 7 years ago

backed out r118835 as it incorrectly updated the 'This file is based on' file headers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1; $Id: pcibio32.asm 69498 2017-10-28 15:07:25Z vboxsync $
2;; @file
3; BIOS32 service directory and 32-bit PCI BIOS entry point
4;
5
6;
7; Copyright (C) 2006-2016 Oracle Corporation
8;
9; This file is part of VirtualBox Open Source Edition (OSE), as
10; available from http://www.virtualbox.org. This file is free software;
11; you can redistribute it and/or modify it under the terms of the GNU
12; General Public License (GPL) as published by the Free Software
13; Foundation, in version 2 as it comes in the "COPYING" file of the
14; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16;
17; --------------------------------------------------------------------
18
19
20; Public symbols for debugging only
21public pcibios32_entry
22public bios32_service
23
24; The BIOS32 service directory header must be located in the E0000h-FFFF0h
25; range on a paragraph boundary. Note that the actual 32-bit code need not
26; be located below 1MB at all.
27
28_DATA segment public 'DATA'
29
30align 16
31bios32_directory:
32 db '_32_' ; ASCII signature
33 dw bios32_service ; Entry point address...
34 dw 000Fh ; ...hardcoded to F000 segment
35 db 0 ; Revision
36 db 1 ; Length in paras - must be 1
37 db 0 ; Checksum calculated later
38 db 5 dup(0) ; Unused, must be zero
39
40_DATA ends
41
42.386
43
44extrn _pci32_function:near
45
46BIOS32 segment public 'CODE' use32
47
48;
49; The BIOS32 Service Directory - must be less than 4K in size (easy!).
50;
51bios32_service proc far
52
53 pushfd
54
55 cmp bl, 0 ; Only function 0 supported
56 jnz b32_bad_func
57
58 cmp eax, 'ICP$' ; "$PCI"
59 mov al, 80h ; Unknown service
60 jnz b32_done
61
62 mov ebx, 000f0000h ; Base address (linear)
63 mov ecx, 0f000h ; Length of service
64 mov edx, pcibios32_entry ; Entry point offset from base
65 xor al, al ; Indicate success
66b32_done:
67 popfd
68 retf
69
70b32_bad_func:
71 mov al, 81h ; Unsupported function
72 jmp b32_done
73
74bios32_service endp
75
76;
77; The 32-bit PCI BIOS entry point - simply calls into C code.
78;
79pcibios32_entry proc far
80
81 pushfd ; Preserve flags
82 cld ; Just in case...
83
84 push es ; Call into C implementation
85 pushad
86 call _pci32_function
87 popad
88 pop es
89
90 popfd ; Restore flags and return
91 retf
92
93pcibios32_entry endp
94
95
96BIOS32 ends
97
98 end
99
Note: See TracBrowser for help on using the repository browser.

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