xref: /reactos/ntoskrnl/include/internal/inbv.h (revision 3c5a56ed)
1 /*
2  * PROJECT:     ReactOS Kernel
3  * LICENSE:     BSD - See COPYING.ARM in the top level directory
4  * PURPOSE:     Boot Video Driver support header
5  * COPYRIGHT:   Copyright 2007 Alex Ionescu (alex.ionescu@reactos.org)
6  *              Copyright 2019-2022 Hermès Bélusca-Maïto
7  */
8 
9 #pragma once
10 
11 /* Native definitions from BOOTVID (Boot Video Driver) */
12 #include "bootvid/bootvid.h"
13 
14 //
15 // Driver Initialization
16 //
17 CODE_SEG("INIT")
18 BOOLEAN
19 NTAPI
20 InbvDriverInitialize(
21     _In_ PLOADER_PARAMETER_BLOCK LoaderBlock,
22     _In_ ULONG Count
23 );
24 
25 extern BOOLEAN InbvBootDriverInstalled;
26 
27 INBV_DISPLAY_STATE
28 NTAPI
29 InbvGetDisplayState(VOID);
30 
31 VOID
32 NTAPI
33 InbvAcquireLock(VOID);
34 
35 VOID
36 NTAPI
37 InbvReleaseLock(VOID);
38 
39 PUCHAR
40 NTAPI
41 InbvGetResourceAddress(
42     _In_ ULONG ResourceNumber
43 );
44 
45 //
46 // Display Functions
47 //
48 VOID
49 NTAPI
50 InbvBitBlt(
51     _In_ PUCHAR Buffer,
52     _In_ ULONG X,
53     _In_ ULONG Y
54 );
55 
56 VOID
57 NTAPI
58 InbvBufferToScreenBlt(
59     _In_ PUCHAR Buffer,
60     _In_ ULONG X,
61     _In_ ULONG Y,
62     _In_ ULONG Width,
63     _In_ ULONG Height,
64     _In_ ULONG Delta
65 );
66 
67 VOID
68 NTAPI
69 InbvScreenToBufferBlt(
70     _Out_ PUCHAR Buffer,
71     _In_ ULONG X,
72     _In_ ULONG Y,
73     _In_ ULONG Width,
74     _In_ ULONG Height,
75     _In_ ULONG Delta
76 );
77 
78 //
79 // Progress-Bar Functions
80 //
81 VOID
82 NTAPI
83 InbvSetProgressBarCoordinates(
84     _In_ ULONG Left,
85     _In_ ULONG Top
86 );
87 
88 CODE_SEG("INIT")
89 VOID
90 NTAPI
91 InbvIndicateProgress(VOID);
92 
93 VOID
94 NTAPI
95 InbvSetProgressBarSubset(
96     _In_ ULONG Floor,
97     _In_ ULONG Ceiling
98 );
99 
100 VOID
101 NTAPI
102 InbvUpdateProgressBar(
103     _In_ ULONG Percentage
104 );
105 
106 //
107 // Headless Terminal Support Functions
108 //
109 VOID
110 NTAPI
111 InbvPortEnableFifo(
112     IN ULONG PortId,
113     IN BOOLEAN Enable
114 );
115 
116 BOOLEAN
117 NTAPI
118 InbvPortPollOnly(
119     IN ULONG PortId
120 );
121 
122 BOOLEAN
123 NTAPI
124 InbvPortGetByte(
125     IN ULONG PortId,
126     OUT PUCHAR Byte
127 );
128 
129 VOID
130 NTAPI
131 InbvPortPutByte(
132     IN ULONG PortId,
133     IN UCHAR Byte
134 );
135 
136 VOID
137 NTAPI
138 InbvPortTerminate(
139     IN ULONG PortId
140 );
141 
142 BOOLEAN
143 NTAPI
144 InbvPortInitialize(
145     IN ULONG BaudRate,
146     IN ULONG PortNumber,
147     IN PUCHAR PortAddress,
148     OUT PULONG PortId,
149     IN BOOLEAN IsMMIODevice
150 );
151