- Implement HwIdle() function to put cpu in idle mode, when waiting for keyboard input.
- Patch by Carlo Bramini (carlo dot bramix at libero.it)
See issue #6453 for more details.
svn path=/trunk/; revision=56270
return ArmBoardBlock->MemoryMapEntryCount;
}
+VOID
+ArmHwIdle(VOID)
+{
+ /* UNIMPLEMENTED */
+}
+
VOID
MachInit(IN PCCH CommandLine)
{
MachVtbl.GetMemoryMap = ArmMemGetMemoryMap;
MachVtbl.HwDetect = ArmHwDetect;
MachVtbl.DiskGetBootPath = ArmDiskGetBootPath;
+ MachVtbl.HwIdle = ArmHwIdle;
}
return SystemKey;
}
+VOID
+PcHwIdle(VOID)
+{
+ REGS Regs;
+
+ /* Select APM 1.0+ function */
+ Regs.b.ah = 0x53;
+
+ /* Function 05h: CPU idle */
+ Regs.b.al = 0x05;
+
+ /* Call INT 15h */
+ Int386(0x15, &Regs, &Regs);
+
+ /* Check if successfull (CF set on error) */
+ if (INT386_SUCCESS(Regs))
+ return;
+
+ /*
+ * No futher processing here.
+ * Optionally implement HLT instruction handling.
+ */
+}
+
/* EOF */
MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
MachVtbl.GetTime = PcGetTime;
MachVtbl.HwDetect = PcHwDetect;
+ MachVtbl.HwIdle = PcHwIdle;
}
VOID
MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount;
MachVtbl.GetTime = XboxGetTime;
MachVtbl.HwDetect = XboxHwDetect;
+ MachVtbl.HwIdle = XboxHwIdle;
/* Set LEDs to orange after init */
XboxSetLED("oooo");
return SystemKey;
}
+VOID XboxHwIdle(VOID)
+{
+ /* UNIMPLEMENTED */
+}
+
/* EOF */
return RootKey;
}
+VOID
+PpcHwIdle(VOID)
+{
+ /* UNIMPLEMENTED */
+}
+
/* Compatibility functions that don't do much */
VOID PpcVideoPrepareForReactOS(BOOLEAN Setup) {
}
MachVtbl.GetTime = PpcGetTime;
MachVtbl.HwDetect = PpcHwDetect;
+ MachVtbl.HwIdle = PpcHwIdle;
}
void PpcOfwInit()
return SystemKey;
}
+VOID
+PpcPrepHwIdle(VOID)
+{
+ /* UNIMPLEMENTED */
+}
+
void PpcPrepInit()
{
MachVtbl.ConsPutChar = PpcPrepPutChar;
MachVtbl.GetMemoryMap = PpcPrepGetMemoryMap;
MachVtbl.HwDetect = PpcPrepHwDetect;
+ MachVtbl.HwIdle = PcPrepHwIdle;
printf( "FreeLDR version [%s]\n", GetFreeLoaderVersionString() );
TIMEINFO* XboxGetTime(VOID);
PCONFIGURATION_COMPONENT_DATA XboxHwDetect(VOID);
+VOID XboxHwIdle(VOID);
VOID XboxSetLED(PCSTR Pattern);
TIMEINFO* PcGetTime(VOID);
PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID);
+VOID PcHwIdle(VOID);
extern BIOS_MEMORY_MAP PcBiosMemoryMap[];
extern ULONG PcBiosMapCount;
ULONG (*GetRelativeTime)(VOID);
PCONFIGURATION_COMPONENT_DATA (*HwDetect)(VOID);
+ VOID (*HwIdle)(VOID);
} MACHVTBL, *PMACHVTBL;
VOID MachInit(const char *CmdLine);
BOOLEAN MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
ULONG MachDiskGetCacheableBlockCount(UCHAR DriveNumber);
VOID MachPrepareForReactOS(IN BOOLEAN Setup);
+VOID MachHwIdle(VOID);
#define MachConsPutChar(Ch) MachVtbl.ConsPutChar(Ch)
#define MachConsKbHit() MachVtbl.ConsKbHit()
#define MachDiskGetDriveGeometry(Drive, Geom) MachVtbl.DiskGetDriveGeometry((Drive), (Geom))
#define MachDiskGetCacheableBlockCount(Drive) MachVtbl.DiskGetCacheableBlockCount(Drive)
#define MachHwDetect() MachVtbl.HwDetect()
+#define MachHwIdle() MachVtbl.HwIdle()
/* EOF */
TuiUpdateDateTime();
VideoCopyOffScreenBufferToVRAM();
+
+ MachHwIdle();
}
}
TuiUpdateDateTime();
VideoCopyOffScreenBufferToVRAM();
+
+ MachHwIdle();
}
// Hide the cursor again
//
break;
}
+
+ MachHwIdle();
}
//