VirtualBox

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

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

*: scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1; $Id: pcibio32.asm 69496 2017-10-28 14:55:58Z vboxsync $
2;; @file
3; BIOS32 service directory and 32-bit PCI BIOS entry point
4;
5
6;
7; Copyright (C) 2006-2017 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; Public symbols for debugging only
19public pcibios32_entry
20public bios32_service
21
22; The BIOS32 service directory header must be located in the E0000h-FFFF0h
23; range on a paragraph boundary. Note that the actual 32-bit code need not
24; be located below 1MB at all.
25
26_DATA segment public 'DATA'
27
28align 16
29bios32_directory:
30 db '_32_' ; ASCII signature
31 dw bios32_service ; Entry point address...
32 dw 000Fh ; ...hardcoded to F000 segment
33 db 0 ; Revision
34 db 1 ; Length in paras - must be 1
35 db 0 ; Checksum calculated later
36 db 5 dup(0) ; Unused, must be zero
37
38_DATA ends
39
40.386
41
42extrn _pci32_function:near
43
44BIOS32 segment public 'CODE' use32
45
46;
47; The BIOS32 Service Directory - must be less than 4K in size (easy!).
48;
49bios32_service proc far
50
51 pushfd
52
53 cmp bl, 0 ; Only function 0 supported
54 jnz b32_bad_func
55
56 cmp eax, 'ICP$' ; "$PCI"
57 mov al, 80h ; Unknown service
58 jnz b32_done
59
60 mov ebx, 000f0000h ; Base address (linear)
61 mov ecx, 0f000h ; Length of service
62 mov edx, pcibios32_entry ; Entry point offset from base
63 xor al, al ; Indicate success
64b32_done:
65 popfd
66 retf
67
68b32_bad_func:
69 mov al, 81h ; Unsupported function
70 jmp b32_done
71
72bios32_service endp
73
74;
75; The 32-bit PCI BIOS entry point - simply calls into C code.
76;
77pcibios32_entry proc far
78
79 pushfd ; Preserve flags
80 cld ; Just in case...
81
82 push es ; Call into C implementation
83 pushad
84 call _pci32_function
85 popad
86 pop es
87
88 popfd ; Restore flags and return
89 retf
90
91pcibios32_entry endp
92
93
94BIOS32 ends
95
96 end
97
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