VirtualBox

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

Last change on this file since 87766 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

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