VirtualBox

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

Last change on this file since 96407 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1; $Id: pcibio32.asm 96407 2022-08-22 17:43:14Z vboxsync $
2;; @file
3; BIOS32 service directory and 32-bit PCI BIOS entry point
4;
5
6;
7; Copyright (C) 2006-2022 Oracle and/or its affiliates.
8;
9; This file is part of VirtualBox base platform packages, as
10; available from https://www.virtualbox.org.
11;
12; This program is free software; you can redistribute it and/or
13; modify it under the terms of the GNU General Public License
14; as published by the Free Software Foundation, in version 3 of the
15; License.
16;
17; This program is distributed in the hope that it will be useful, but
18; WITHOUT ANY WARRANTY; without even the implied warranty of
19; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20; General Public License for more details.
21;
22; You should have received a copy of the GNU General Public License
23; along with this program; if not, see <https://www.gnu.org/licenses>.
24;
25; SPDX-License-Identifier: GPL-3.0-only
26; --------------------------------------------------------------------
27
28
29; Public symbols for debugging only
30public pcibios32_entry
31public bios32_service
32
33; The BIOS32 service directory header must be located in the E0000h-FFFF0h
34; range on a paragraph boundary. Note that the actual 32-bit code need not
35; be located below 1MB at all.
36
37_DATA segment public 'DATA'
38
39align 16
40bios32_directory:
41 db '_32_' ; ASCII signature
42 dw bios32_service ; Entry point address...
43 dw 000Fh ; ...hardcoded to F000 segment
44 db 0 ; Revision
45 db 1 ; Length in paras - must be 1
46 db 0 ; Checksum calculated later
47 db 5 dup(0) ; Unused, must be zero
48
49_DATA ends
50
51.386
52
53extrn _pci32_function:near
54
55BIOS32 segment public 'CODE' use32
56
57;
58; The BIOS32 Service Directory - must be less than 4K in size (easy!).
59;
60bios32_service proc far
61
62 pushfd
63
64 cmp bl, 0 ; Only function 0 supported
65 jnz b32_bad_func
66
67 cmp eax, 'ICP$' ; "$PCI"
68 mov al, 80h ; Unknown service
69 jnz b32_done
70
71 mov ebx, 000f0000h ; Base address (linear)
72 mov ecx, 0f000h ; Length of service
73 mov edx, pcibios32_entry ; Entry point offset from base
74 xor al, al ; Indicate success
75b32_done:
76 popfd
77 retf
78
79b32_bad_func:
80 mov al, 81h ; Unsupported function
81 jmp b32_done
82
83bios32_service endp
84
85;
86; The 32-bit PCI BIOS entry point - simply calls into C code.
87;
88pcibios32_entry proc far
89
90 pushfd ; Preserve flags
91 cld ; Just in case...
92
93 push es ; Call into C implementation
94 pushad
95 call _pci32_function
96 popad
97 pop es
98
99 popfd ; Restore flags and return
100 retf
101
102pcibios32_entry endp
103
104
105BIOS32 ends
106
107 end
108
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