8efe091ff9d40861abbfef7526cc0997db2198b6
[reactos.git] / boot / freeldr / freeldr / include / arch / pc / machpc.h
1 /*
2 * FreeLoader
3 *
4 * Copyright (C) 2003 Eric Kohl
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #pragma once
22
23 #ifndef __MEMORY_H
24 #include "mm.h"
25 #endif
26
27 VOID PcMachInit(const char *CmdLine);
28
29 VOID PcBeep(VOID);
30
31 VOID PcConsPutChar(int Ch);
32 BOOLEAN PcConsKbHit(VOID);
33 int PcConsGetCh(VOID);
34
35 VOID PcVideoClearScreen(UCHAR Attr);
36 VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init);
37 VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth);
38 ULONG PcVideoGetBufferSize(VOID);
39 VOID PcVideoGetFontsFromFirmware(PULONG RomFontPointers);
40 VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y);
41 VOID PcVideoHideShowTextCursor(BOOLEAN Show);
42 VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
43 VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer);
44 BOOLEAN PcVideoIsPaletteFixed(VOID);
45 VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
46 VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue);
47 VOID PcVideoSync(VOID);
48 VOID PcVideoPrepareForReactOS(VOID);
49 VOID PcPrepareForReactOS(VOID);
50
51 PFREELDR_MEMORY_DESCRIPTOR PcMemGetMemoryMap(ULONG *MemoryMapSize);
52 BOOLEAN PcFindPciBios(PPCI_REGISTRY_INFO BusData);
53
54 /*
55 * Disk Variables and Functions
56 */
57 /* Platform-specific boot drive and partition numbers */
58 extern UCHAR FrldrBootDrive;
59 extern ULONG FrldrBootPartition;
60
61 VOID DiskReportError(BOOLEAN bError);
62 BOOLEAN DiskResetController(UCHAR DriveNumber);
63 BOOLEAN DiskGetExtendedDriveParameters(UCHAR DriveNumber, PVOID Buffer, USHORT BufferSize);
64
65 BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
66 BOOLEAN PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
67 ULONG PcDiskGetCacheableBlockCount(UCHAR DriveNumber);
68
69 TIMEINFO* PcGetTime(VOID);
70
71 BOOLEAN PcInitializeBootDevices(VOID);
72 PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID);
73 VOID PcHwIdle(VOID);
74
75 extern BIOS_MEMORY_MAP PcBiosMemoryMap[];
76 extern ULONG PcBiosMapCount;
77
78 /* EOF */