Add hardware detection stub for Xbox

svn path=/trunk/; revision=11859
This commit is contained in:
Gé van Geldorp 2004-11-28 22:42:40 +00:00
parent 7123f1d088
commit 6e001376f9
11 changed files with 56 additions and 9 deletions

View file

@ -220,6 +220,7 @@ ARCH_OBJS = fathelp.o \
xboxcons.o \
xboxdisk.o \
xboxfont.o \
xboxhw.o \
xboxmem.o \
xboxrtc.o \
xboxvideo.o \

View file

@ -2231,7 +2231,7 @@ DetectIsaBios(HKEY SystemKey, U32 *BusNumber)
VOID
DetectHardware(VOID)
PcHwDetect(VOID)
{
HKEY SystemKey;
U32 BusNumber = 0;

View file

@ -1,4 +1,4 @@
/* $Id: machpc.c,v 1.6 2004/11/23 11:28:02 gvg Exp $
/* $Id: machpc.c,v 1.7 2004/11/28 22:42:40 gvg Exp $
*
* FreeLoader
*
@ -53,6 +53,7 @@ PcMachInit(VOID)
MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
MachVtbl.RTCGetCurrentDateTime = PcRTCGetCurrentDateTime;
MachVtbl.HwDetect = PcHwDetect;
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: machpc.h,v 1.6 2004/11/23 11:28:02 gvg Exp $
/* $Id: machpc.h,v 1.7 2004/11/28 22:42:40 gvg Exp $
*
* FreeLoader
*
@ -55,6 +55,8 @@ U32 PcDiskGetCacheableBlockCount(U32 DriveNumber);
VOID PcRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second);
VOID PcHwDetect(VOID);
#endif /* __I386_MACHPC_H_ */
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: machxbox.c,v 1.6 2004/11/23 11:28:02 gvg Exp $
/* $Id: machxbox.c,v 1.7 2004/11/28 22:42:40 gvg Exp $
*
* FreeLoader
*
@ -51,4 +51,5 @@ XboxMachInit(VOID)
MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry;
MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount;
MachVtbl.RTCGetCurrentDateTime = XboxRTCGetCurrentDateTime;
MachVtbl.HwDetect = XboxHwDetect;
}

View file

@ -1,4 +1,4 @@
/* $Id: machxbox.h,v 1.6 2004/11/23 11:28:02 gvg Exp $
/* $Id: machxbox.h,v 1.7 2004/11/28 22:42:40 gvg Exp $
*
* FreeLoader
*
@ -57,6 +57,9 @@ BOOL XboxDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry);
U32 XboxDiskGetCacheableBlockCount(U32 DriveNumber);
VOID XboxRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second);
VOID XboxHwDetect(VOID);
#endif /* __I386_HWXBOX_H_ */
/* EOF */

View file

@ -0,0 +1,29 @@
/* $Id: xboxhw.c,v 1.1 2004/11/28 22:42:40 gvg Exp $
*
* FreeLoader
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "freeldr.h"
#include "machine.h"
#include "machxbox.h"
VOID
XboxHwDetect(VOID)
{
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: machine.h,v 1.6 2004/11/23 11:28:02 gvg Exp $
/* $Id: machine.h,v 1.7 2004/11/28 22:42:40 gvg Exp $
*
* FreeLoader
*
@ -62,6 +62,8 @@ typedef struct tagMACHVTBL
U32 (*DiskGetCacheableBlockCount)(U32 DriveNumber);
VOID (*RTCGetCurrentDateTime)(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second);
VOID (*HwDetect)(VOID);
} MACHVTBL, *PMACHVTBL;
VOID MachInit(VOID);
@ -90,6 +92,7 @@ extern MACHVTBL MachVtbl;
#define MachDiskGetDriveGeometry(Drive, Geom) MachVtbl.DiskGetDriveGeometry((Drive), (Geom))
#define MachDiskGetCacheableBlockCount(Drive) MachVtbl.DiskGetCacheableBlockCount(Drive)
#define MachRTCGetCurrentDateTime(Y, Mo, D, H, Mi, S) MachVtbl.RTCGetCurrentDateTime((Y), (Mo), (D), (H), (Mi), (S));
#define MachHwDetect() MachVtbl.HwDetect()
#endif /* __MACHINE_H_ */

View file

@ -1,4 +1,4 @@
/* $Id: machine.c,v 1.6 2004/11/23 11:28:02 gvg Exp $
/* $Id: machine.c,v 1.7 2004/11/28 22:42:39 gvg Exp $
*
* FreeLoader
*
@ -42,6 +42,7 @@
#undef MachDiskGetDriveGeometry
#undef MachDiskGetCacheableBlockCount
#undef MachRTCGetCurrentDateTime
#undef MachHwDetect
MACHVTBL MachVtbl;
@ -177,4 +178,10 @@ MachRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minut
MachVtbl.RTCGetCurrentDateTime(Year, Month, Day, Hour, Minute, Second);
}
VOID
MachHwDetect(VOID)
{
MachVtbl.HwDetect();
}
/* EOF */

View file

@ -739,7 +739,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
/*
* Detect hardware
*/
DetectHardware();
MachHwDetect();
UiDrawStatusText("Loading...");

View file

@ -302,7 +302,7 @@ VOID RunLoader(VOID)
#else
printf("Detecting hardware...\n\n");
#endif
DetectHardware();
MachHwDetect();
#ifdef USE_UI
UiDrawStatusText("");
#endif