mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 21:04:26 +00:00
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
/*
|
|
* PROJECT: ReactOS Boot Loader
|
|
* LICENSE: BSD - See COPYING.ARM in the top level directory
|
|
* FILE: boot/armllb/hw/versatile/hwinit.c
|
|
* PURPOSE: LLB Hardware Initialization Routines for Versatile
|
|
* PROGRAMMERS: ReactOS Portable Systems Group
|
|
*/
|
|
|
|
#include "precomp.h"
|
|
|
|
VOID
|
|
NTAPI
|
|
LlbHwInitialize(VOID)
|
|
{
|
|
/* Setup the CLCD (PL110) */
|
|
LlbHwVersaClcdInitialize();
|
|
|
|
/* Setup the UART (PL011) */
|
|
LlbHwVersaUartInitialize();
|
|
|
|
/* Setup the KMI (PL050) */
|
|
LlbHwVersaKmiInitialize();
|
|
}
|
|
|
|
//
|
|
// Should go to hwdev.c
|
|
//
|
|
POSLOADER_INIT
|
|
NTAPI
|
|
LlbHwLoadOsLoaderFromRam(VOID)
|
|
{
|
|
ULONG Base, RootFs, Size;
|
|
PCHAR Offset;
|
|
CHAR CommandLine[64];
|
|
|
|
/* On versatile we load the RAMDISK with initrd */
|
|
LlbEnvGetRamDiskInformation(&RootFs, &Size);
|
|
|
|
/* The OS Loader is at 0x20000, always */
|
|
Base = 0x20000;
|
|
|
|
/* Read image offset */
|
|
Offset = LlbEnvRead("rdoffset");
|
|
|
|
/* Set parameters for the OS loader */
|
|
sprintf(CommandLine, "rdbase=0x%x rdsize=0x%x rdoffset=%s", RootFs, Size, Offset);
|
|
LlbSetCommandLine(CommandLine);
|
|
|
|
/* Return the OS loader base address */
|
|
return (POSLOADER_INIT)Base;
|
|
}
|
|
|
|
|
|
/* EOF */
|