2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: boot/armllb/hw/versatile/hwinit.c
5 * PURPOSE: LLB Hardware Initialization Routines for Versatile
6 * PROGRAMMERS: ReactOS Portable Systems Group
15 /* Setup the CLCD (PL110) */
16 LlbHwVersaClcdInitialize();
18 /* Setup the UART (PL011) */
19 LlbHwVersaUartInitialize();
21 /* Setup the KMI (PL050) */
22 LlbHwVersaKmiInitialize();
26 // Should go to hwdev.c
30 LlbHwLoadOsLoaderFromRam(VOID
)
32 ULONG Base
, RootFs
, Size
;
35 /* On versatile, the NAND image is loaded as the RAMDISK */
36 LlbEnvGetRamDiskInformation(&Base
, &Size
);
38 /* The LLB is first, which we already have, so skip it */
39 Base
+= 0x10000; // 64 KB (see nandflash)
41 /* The OS loader is next, followed by the root file system */
42 RootFs
= Base
+ 0x80000; // 512 KB (see nandflash)
44 /* Set parameters for the OS loader */
45 sprintf(CommandLine
, "rdbase=0x%x rdsize=0x%x", RootFs
, Size
);
46 LlbSetCommandLine(CommandLine
);
48 /* Return the OS loader base address */
49 return (POSLOADER_INIT
)Base
;