68 ULONG MaxMemoryMapSize )
72 register int oldStore = 0, newStore = 0, change = 0, oldmsr;
74 __asm__(
"mfmsr %0\n" :
"=r" (oldmsr));
75 change = oldmsr & 0x6fff;
76 __asm__(
"mtmsr %0\n" : :
"r" (change));
81 for (physAddr = 0x40000, change = newStore;
82 (physAddr < 0x80000000) && (change == newStore);
86 newStore = (physAddr & 0x1000) ? 0x55aa55aa : 0xaa55aa55;
97 __asm__(
"mtmsr %0\n" : :
"r" (oldmsr));
101 printf(
"Actual RAM: %d Mb\n", physAddr >> 20);
113 printf(
"DetectHardware() Done\n");
PCONFIGURATION_COMPONENT_DATA PpcPrepHwDetect()
void PpcPrepPutChar(int ch)
PFREELDR_MEMORY_DESCRIPTOR(* GetMemoryMap)(PULONG MaxMemoryMapSize)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
int GetPhysByte(int Addr)
void BootMain(PSTR CmdLine)
VOID(* VideoClearScreen)(UCHAR Attr)
PCONFIGURATION_COMPONENT_DATA(* HwDetect)(VOID)
VOID(* VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth)
PFREELDR_MEMORY_DESCRIPTOR BiosMemoryMap
int ide_read(void *extension, char *buffer, int bytes)
void ide_seek(void *extension, int low, int high)
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
const PCSTR FrLdrVersionString
BOOLEAN PpcPrepDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
struct _idectl_desc ide1_desc
void ide_setup(void *extension)
ULONG GetPhys(ULONG Addr)
BOOLEAN(* DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
BOOLEAN(* ConsKbHit)(VOID)
static VIDEODISPLAYMODE DisplayMode
VIDEODISPLAYMODE PpcPrepVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init)
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
void PpcPrepVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
VOID(* ConsPutChar)(int Ch)
void PpcPrepVideoClearScreen(UCHAR Attr)
VOID PpcInitializeMmu(int max)
BOOLEAN PpcPrepConsKbHit()
VIDEODISPLAYMODE(* VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init)
VOID NTAPI FldrCreateSystemKey(OUT PCONFIGURATION_COMPONENT_DATA *SystemNode)
ULONG PpcPrepGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize)
void SetPhys(ULONG Addr, ULONG Data)
void SetPhysByte(ULONG Addr, ULONG Data)