ReactOS 0.4.16-dev-197-g92996da
hwinit.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: boot/armllb/hw/omap3-zoom2/hwinit.c
5 * PURPOSE: LLB UART Initialization Routines for OMAP3 ZOOM2
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9#include "precomp.h"
10
11//
12// OMAP3 Memory Map
13//
14// 0x00000000 - 0x3FFFFFFF GPMC [ 1 GB]
15// 0x40000000 - 0x47FFFFFF On-Chip Memory (ROM/SRAM Address Space) [128 MB]
16// 0x48000000 - 0x4FFFFFFF L4 Interconnects (All system peripherals)[128 MB]
17// 0x50000000 - 0x53FFFFFF SGX Graphics Accelerator Slave Port [ 64 MB]
18// 0x54000000 - 0x57FFFFFF L4 Emulation [128 MB]
19// 0x58000000 - 0x58FFFFFF Reserved [ 64 MB]
20// 0x5C000000 - 0x5FFFFFFF IVA2.2 Subsystem [ 64 MB]
21// 0x60000000 - 0x67FFFFFF Reserved [128 MB]
22// 0x68000000 - 0x6FFFFFFF L3 Interconnect (Control Registers) [128 MB]
23// 0x70000000 - 0x7FFFFFFF SDRC/SMS Virtual Address Space 0 [256 MB]
24// 0x80000000 - 0x9FFFFFFF SDRC/SMS CS0 SDRAM [512 MB]
25 // 0x80000000 - 0x80FFFFFF KERNEL, HAL, BOOT DRIVERS [ 16 MB]
26// THIS IS THE x86-STYLE "LOW 1MB" THAT IS IDENTITY MAPPED
27 // 0x81000000 - 0x8100FFFF ARM LLB [ 64 KB]
28 // 0x81010000 - 0x81013FFF ARM BOOT STACK [ 16 KB]
29 // 0x81014000 - 0x81073FFF ARM FRAMEBUFFER [384 KB]
30 // 0x81070000 - 0x81093FFF ARM OS LOADER [128 KB]
31 // 0x81094000 - 0x810FFFFF RESERVED FOR BOOT LOADER EXPANSION [432 KB]
32// END OF THE x86-STYLE "LOW 1MB" THAT IS IDENTITY MAPPED
33 // 0x81100000 - 0x8FFFFFFF FREE RAM [ 15 MB]
34 // 0x82000000 - 0x83FFFFFF ARM RAMDISK [ 32 MB]
35 // 0x84000000 - 0x8FFFFFFF FREE RAM [192 MB]
36 // 0x90000000 - 0x9FFFFFFF FREE RAM IF > 256MB INSTALLED [256 MB]
37// 0xA0000000 - 0xBFFFFFFF SDRC/SMS CS1 SDRAM [512 MB]
38 // 0xA0000000 - 0xAFFFFFFF FREE RAM IF > 512MB INSTALLED [256 MB]
39 // 0xB0000000 - 0xBFFFFFFF FREE RAM IF > 768MB INSTALLED [256 MB]
40// 0xC0000000 - 0xDFFFFFFF Reserved [512 MB]
41// 0xE0000000 - 0xFFFFFFFF SDRC/SMS Virtual Address Space 1 [512 MB]
43{
44 {0x00000000, 0x80000000, BiosMemoryReserved, 0}, /* Device Registers */
45 {0x80000000, 0x01000000, BiosMemoryUsable, 0}, /* 16 MB RAM for Kernel map */
46 {0x81000000, 0x00010000, BiosMemoryBootLoader, 0}, /* Arm LLB */
47 {0x81010000, 0x00004000, BiosMemoryBootStrap, 0}, // LLB Stack
48 {0x81014000, 0x00060000, BiosMemoryBootLoader, 0}, /* Kernel Framebuffer */
49 {0x81070000, 0x00020000, BiosMemoryBootStrap, 0}, /* ARM OS Loader */
50 {0x81094000, 0x0006C000, BiosMemoryBootStrap, 0}, /* ARM OS Loader Expansion */
51 {0x81100000, 0x00F00000, BiosMemoryUsable, 0}, /* 15 MB Free RAM */
52 {0x82000000, 0x02000000, BiosMemoryBootStrap, 0}, /* 32MB RAMDISK */
53 {0x84000000, 0x0C000000, BiosMemoryUsable, 0}, /* 192 MB Free RAM */
54 {0x90000000, 0x70000000, BiosMemoryReserved, 0},
55 {0, 0, 0, 0}
56};
57
58VOID
61{
62 PBIOS_MEMORY_MAP MapEntry;
63 ULONG Base, Size, FsBase, FsSize;
64
65 /* Parse hardware memory map */
66 MapEntry = LlbHwOmap3MemoryMap;
67 while (MapEntry->Length)
68 {
69 /* Add this entry */
70 LlbAllocateMemoryEntry(MapEntry->Type, MapEntry->BaseAddress, MapEntry->Length);
71
72 /* Move to the next one */
73 MapEntry++;
74 }
75
76 /* Query memory and RAMDISK information */
78 LlbEnvGetRamDiskInformation(&FsBase, &FsSize);
79 if (!FsSize) return;
80#ifdef _BEAGLE_
81 /* Add-in the size of the ramdisk */
82 Base = FsBase + FsSize;
83
84 /* Subtract size of ramdisk and anything else before it */
85 Size -= Base;
86
87 /* Allocate an entry for it */
89#endif
90}
91
92VOID
95{
96 /* Setup the UART (NS16550) */
98
99 /* Setup the NEC WVGA LCD Panel and the Display Controller */
101
102 /* Setup the keyboard */
104}
105
106/* EOF */
BIOS_MEMORY_MAP MemoryMap[32]
Definition: loader.c:11
VOID NTAPI LlbEnvGetMemoryInformation(IN PULONG Base, IN PULONG Size)
Definition: envir.c:97
BOOLEAN NTAPI LlbEnvGetRamDiskInformation(IN PULONG Base, IN PULONG Size)
Definition: envir.c:107
VOID NTAPI LlbHwOmap3LcdInitialize(VOID)
Definition: hwlcd.c:15
VOID NTAPI LlbHwOmap3SynKpdInitialize(VOID)
Definition: hwsynkp.c:15
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2451
VOID NTAPI LlbHwInitialize(VOID)
Definition: hwinit.c:13
VOID NTAPI LlbHwOmap3UartInitialize(VOID)
Definition: hwuart.c:15
VOID NTAPI LlbHwBuildMemoryMap(IN PBIOS_MEMORY_MAP MemoryMap)
Definition: hwinit.c:60
BIOS_MEMORY_MAP LlbHwOmap3MemoryMap[]
Definition: hwinit.c:42
VOID NTAPI LlbAllocateMemoryEntry(IN BIOS_MEMORY_TYPE Type, IN ULONG BaseAddress, IN ULONG Length)
Definition: loader.c:17
@ BiosMemoryUsable
Definition: osloader.h:22
@ BiosMemoryBootStrap
Definition: osloader.h:24
@ BiosMemoryBootLoader
Definition: osloader.h:23
@ BiosMemoryReserved
Definition: osloader.h:25
LONGLONG BaseAddress
Definition: osloader.h:33
LONGLONG Length
Definition: osloader.h:34
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533