[NTOSKRNL/FREELDR/NDK]
[reactos.git] / reactos / boot / freeldr / freeldr / include / arch / arm / hardware.h
1 /*
2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: boot/freeldr/include/arch/arm/hardware.h
5 * PURPOSE: Header for ARC definitions (to be cleaned up)
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 #pragma once
10
11 #ifndef __REGISTRY_H
12 //#include "../../reactos/registry.h"
13 #endif
14
15 #include "../../../../../armllb/inc/osloader.h"
16 #include "../../../../../armllb/inc/machtype.h"
17
18 #define FREELDR_BASE 0x0001F000
19 #define FREELDR_PE_BASE 0x0001F000
20 #define MAX_FREELDR_PE_SIZE 0xFFFFFF
21
22 extern PARM_BOARD_CONFIGURATION_BLOCK ArmBoardBlock;
23 extern ULONG FirstLevelDcacheSize;
24 extern ULONG FirstLevelDcacheFillSize;
25 extern ULONG FirstLevelIcacheSize;
26 extern ULONG FirstLevelIcacheFillSize;
27 extern ULONG SecondLevelDcacheSize;
28 extern ULONG SecondLevelDcacheFillSize;
29 extern ULONG SecondLevelIcacheSize;
30 extern ULONG SecondLevelIcacheFillSize;
31
32 extern ULONG gDiskReadBuffer, gFileSysBuffer;
33 #define DiskReadBuffer ((PVOID)gDiskReadBuffer)
34
35 #define DriveMapGetBiosDriveNumber(DeviceName) 0
36
37 FORCEINLINE VOID Reboot(VOID)
38 {
39 DbgBreakPoint();
40 }
41
42 typedef struct _PAGE_TABLE_ARM
43 {
44 HARDWARE_PTE_ARMV6 Pte[1024];
45 } PAGE_TABLE_ARM, *PPAGE_TABLE_ARM;
46 C_ASSERT(sizeof(PAGE_TABLE_ARM) == PAGE_SIZE);
47
48 typedef struct _PAGE_DIRECTORY_ARM
49 {
50 union
51 {
52 HARDWARE_PDE_ARMV6 Pde[4096];
53 HARDWARE_LARGE_PTE_ARMV6 Pte[4096];
54 };
55 } PAGE_DIRECTORY_ARM, *PPAGE_DIRECTORY_ARM;
56 C_ASSERT(sizeof(PAGE_DIRECTORY_ARM) == (4 * PAGE_SIZE));
57
58 // FIXME: sync with NDK
59 typedef enum _ARM_DOMAIN
60 {
61 FaultDomain,
62 ClientDomain,
63 InvalidDomain,
64 ManagerDomain
65 } ARM_DOMAIN;
66
67 #define PDE_SHIFT 20