ReactOS  0.4.15-dev-3717-g292e6a4
hwinfo.c File Reference
#include "precomp.h"
Include dependency graph for hwinfo.c:

Go to the source code of this file.

Macros

#define PL031_RTC_DR   (LlbHwVersaRtcBase + 0x00)
 

Functions

ULONG NTAPI LlbHwGetBoardType (VOID)
 
ULONG NTAPI LlbHwGetPClk (VOID)
 
ULONG NTAPI LlbHwGetTmr0Base (VOID)
 
ULONG NTAPI LlbHwGetSerialUart (VOID)
 
VOID NTAPI LlbHwBuildMemoryMap (IN PBIOS_MEMORY_MAP MemoryMap)
 
ULONG LlbHwRtcRead (VOID)
 

Variables

static const ULONG LlbHwVersaRtcBase = 0x101E8000
 
BIOS_MEMORY_MAP LlbHwVersaMemoryMap []
 

Macro Definition Documentation

◆ PL031_RTC_DR

#define PL031_RTC_DR   (LlbHwVersaRtcBase + 0x00)

Definition at line 11 of file hwinfo.c.

Function Documentation

◆ LlbHwBuildMemoryMap()

VOID NTAPI LlbHwBuildMemoryMap ( IN PBIOS_MEMORY_MAP  MemoryMap)

Definition at line 73 of file hwinfo.c.

74 {
75  PBIOS_MEMORY_MAP MapEntry;
76  ULONG Base, Size, FsBase, FsSize;
77 
78  /* Parse hardware memory map */
79  MapEntry = LlbHwVersaMemoryMap;
80  while (MapEntry->Length)
81  {
82  /* Add this entry */
83  LlbAllocateMemoryEntry(MapEntry->Type, MapEntry->BaseAddress, MapEntry->Length);
84 
85  /* Move to the next one */
86  MapEntry++;
87  }
88 
89  /* Query memory and RAMDISK information */
91  LlbEnvGetRamDiskInformation(&FsBase, &FsSize);
92 
93  /* Add-in the size of the ramdisk */
94  Base = FsBase + FsSize;
95 
96  /* Subtract size of ramdisk and anything else before it */
97  Size -= Base;
98 
99  /* Allocate an entry for it */
101 }
BIOS_MEMORY_MAP LlbHwVersaMemoryMap[]
Definition: hwinfo.c:57
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2386
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
LONGLONG BaseAddress
Definition: osloader.h:33
BOOLEAN NTAPI LlbEnvGetRamDiskInformation(IN PULONG Base, IN PULONG Size)
Definition: envir.c:107
VOID NTAPI LlbAllocateMemoryEntry(IN BIOS_MEMORY_TYPE Type, IN ULONG BaseAddress, IN ULONG Length)
Definition: loader.c:17
unsigned int ULONG
Definition: retypes.h:1
LONGLONG Length
Definition: osloader.h:34
VOID NTAPI LlbEnvGetMemoryInformation(IN PULONG Base, IN PULONG Size)
Definition: envir.c:97

◆ LlbHwGetBoardType()

ULONG NTAPI LlbHwGetBoardType ( VOID  )

Definition at line 16 of file hwinfo.c.

17 {
19 }
#define MACH_TYPE_VERSATILE_PB
Definition: machtype.h:19

◆ LlbHwGetPClk()

ULONG NTAPI LlbHwGetPClk ( VOID  )

Definition at line 23 of file hwinfo.c.

24 {
25  return 24000000;
26 }

◆ LlbHwGetSerialUart()

ULONG NTAPI LlbHwGetSerialUart ( VOID  )

Definition at line 37 of file hwinfo.c.

38 {
39  return 0;
40 }

◆ LlbHwGetTmr0Base()

ULONG NTAPI LlbHwGetTmr0Base ( VOID  )

Definition at line 30 of file hwinfo.c.

31 {
32  return 0x101E2000;
33 }

◆ LlbHwRtcRead()

ULONG LlbHwRtcRead ( VOID  )

Definition at line 104 of file hwinfo.c.

105 {
106  /* Read RTC value */
108 }
#define PL031_RTC_DR
Definition: hwinfo.c:11
NTKERNELAPI ULONG NTAPI READ_REGISTER_ULONG(IN PULONG Register)

Variable Documentation

◆ LlbHwVersaMemoryMap

BIOS_MEMORY_MAP LlbHwVersaMemoryMap[]
Initial value:
=
{
{0x00000000, 0x00000100, BiosMemoryReserved, 0},
{0x00000100, 0x00000100, BiosMemoryBootStrap, 0},
{0x00000200, 0x0000FE00, BiosMemoryBootStrap, 0},
{0x00010000, 0x00010000, BiosMemoryBootStrap, 0},
{0x00020000, 0x00080000, BiosMemoryBootLoader, 0},
{0x000A0000, 0x000A0000, BiosMemoryBootLoader, 0},
{0x00140000, 0x016C0000, BiosMemoryUsable, 0},
{0x01800000, 0x02000000, BiosMemoryReserved, 0},
{0x10000000, 0x10000000, BiosMemoryReserved, 0},
{0, 0, 0, 0}
}

Definition at line 57 of file hwinfo.c.

Referenced by LlbHwBuildMemoryMap().

◆ LlbHwVersaRtcBase

const ULONG LlbHwVersaRtcBase = 0x101E8000
static

Definition at line 12 of file hwinfo.c.