We now return memory map.
[reactos.git] / reactos / boot / freeldr / freeldr / arch / arm / stubs.c
1 /*
2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: boot/freeldr/arch/arm/stubs.c
5 * PURPOSE: Non-completed ARM hardware-specific routines
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include <freeldr.h>
12
13 /* GLOBALS ********************************************************************/
14
15 ULONG PageDirectoryStart, PageDirectoryEnd;
16
17 /* FUNCTIONS ******************************************************************/
18
19 VOID
20 FrLdrStartup(IN ULONG Magic)
21 {
22 //
23 // Start the OS
24 //
25 }
26
27 BOOLEAN
28 ArmDiskGetBootVolume(IN PULONG DriveNumber,
29 IN PULONGLONG StartSector,
30 IN PULONGLONG SectorCount,
31 OUT PINT FsType)
32 {
33 while (TRUE);
34 return FALSE;
35 }
36
37 VOID
38 ArmDiskGetBootDevice(OUT PULONG BootDevice)
39 {
40 while (TRUE);
41 }
42
43 BOOLEAN
44 ArmDiskBootingFromFloppy(VOID)
45 {
46 while (TRUE);
47 return FALSE;
48 }
49
50 BOOLEAN
51 ArmDiskGetSystemVolume(IN PCHAR SystemPath,
52 OUT PCHAR RemainingPath,
53 OUT PULONG Device,
54 OUT PULONG DriveNumber,
55 OUT PULONGLONG StartSector,
56 OUT PULONGLONG SectorCount,
57 OUT PINT FsType)
58 {
59 while (TRUE);
60 return FALSE;
61 }
62
63 BOOLEAN
64 ArmDiskGetBootPath(IN PCHAR BootPath,
65 IN unsigned Size)
66 {
67 while (TRUE);
68 return FALSE;
69 }
70
71 BOOLEAN
72 ArmDiskNormalizeSystemPath(IN PCHAR SystemPath,
73 IN unsigned Size)
74 {
75 while (TRUE);
76 return FALSE;
77 }
78
79 BOOLEAN
80 ArmDiskGetDriveGeometry(IN ULONG DriveNumber,
81 OUT PGEOMETRY Geometry)
82 {
83 while (TRUE);
84 return FALSE;
85 }
86
87 BOOLEAN
88 ArmDiskGetPartitionEntry(IN ULONG DriveNumber,
89 IN ULONG PartitionNumber,
90 OUT PPARTITION_TABLE_ENTRY PartitionTableEntry)
91 {
92 while (TRUE);
93 return FALSE;
94 }
95
96 BOOLEAN
97 ArmDiskReadLogicalSectors(IN ULONG DriveNumber,
98 IN ULONGLONG SectorNumber,
99 IN ULONG SectorCount,
100 IN PVOID Buffer)
101 {
102 while (TRUE);
103 return FALSE;
104 }
105
106 ULONG
107 ArmDiskGetCacheableBlockCount(IN ULONG DriveNumber)
108 {
109 while (TRUE);
110 return FALSE;
111 }
112
113 VOID
114 ArmPrepareForReactOS(IN BOOLEAN Setup)
115 {
116 while (TRUE);
117 }
118
119 PCONFIGURATION_COMPONENT_DATA
120 ArmHwDetect(VOID)
121 {
122 while (TRUE);
123 return NULL;
124 }
125
126 ULONG
127 ArmMemGetMemoryMap(OUT PBIOS_MEMORY_MAP BiosMemoryMap,
128 IN ULONG MaxMemoryMapSize)
129 {
130 //
131 // Return whatever the board returned to us (CS0 Base + Size and FLASH0)
132 //
133 RtlCopyMemory(BiosMemoryMap,
134 ArmBoardBlock->MemoryMap,
135 ArmBoardBlock->MemoryMapEntryCount * sizeof(BIOS_MEMORY_MAP));
136 return ArmBoardBlock->MemoryMapEntryCount;
137 }
138
139 VOID
140 MachInit(IN PCCH CommandLine)
141 {
142 //
143 // Setup board-specific ARM routines
144 //
145 switch (ArmBoardBlock->BoardType)
146 {
147 //
148 // Check for Feroceon-base boards
149 //
150 case ARM_FEROCEON:
151
152 //
153 // These boards use a UART16550. Set us up for 115200 bps
154 //
155 ArmFeroSerialInit(115200);
156 MachVtbl.ConsPutChar = ArmFeroPutChar;
157 MachVtbl.ConsKbHit = ArmFeroKbHit;
158 MachVtbl.ConsGetCh = ArmFeroGetCh;
159 break;
160
161 default:
162 ASSERT(FALSE);
163 }
164
165 //
166 // Setup generic ARM routines
167 //
168 MachVtbl.PrepareForReactOS = ArmPrepareForReactOS;
169 MachVtbl.GetMemoryMap = ArmMemGetMemoryMap;
170 MachVtbl.DiskGetBootVolume = ArmDiskGetBootVolume;
171 MachVtbl.DiskGetSystemVolume = ArmDiskGetSystemVolume;
172 MachVtbl.DiskGetBootPath = ArmDiskGetBootPath;
173 MachVtbl.DiskGetBootDevice = ArmDiskGetBootDevice;
174 MachVtbl.DiskBootingFromFloppy = ArmDiskBootingFromFloppy;
175 MachVtbl.DiskNormalizeSystemPath = ArmDiskNormalizeSystemPath;
176 MachVtbl.DiskReadLogicalSectors = ArmDiskReadLogicalSectors;
177 MachVtbl.DiskGetPartitionEntry = ArmDiskGetPartitionEntry;
178 MachVtbl.DiskGetDriveGeometry = ArmDiskGetDriveGeometry;
179 MachVtbl.DiskGetCacheableBlockCount = ArmDiskGetCacheableBlockCount;
180 MachVtbl.HwDetect = ArmHwDetect;
181
182 //
183 // We can now print to the console
184 //
185 TuiPrintf("%s for ARM\n", GetFreeLoaderVersionString());
186 }