summaryrefslogtreecommitdiffstats
path: root/sys/isa/atrtc.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-11-09 03:55:40 +0000
committerimp <imp@FreeBSD.org>2005-11-09 03:55:40 +0000
commitc8edc59b4092fb95a461e7c3b6ca96b0e32e4649 (patch)
tree860f9fba5e079f89a1448044826aa9c01d4ab747 /sys/isa/atrtc.c
parent15d22053dea70601f4d9d533285ce248d5577417 (diff)
downloadFreeBSD-src-c8edc59b4092fb95a461e7c3b6ca96b0e32e4649.zip
FreeBSD-src-c8edc59b4092fb95a461e7c3b6ca96b0e32e4649.tar.gz
Add support for XBOX to the FreeBSD port. The xbox architecture is
nearly identical to wintel/ia32, with a couple of tweaks. Since it is so similar to ia32, it is optionally added to a i386 kernel. This port is preliminary, but seems to work well. Further improvements will improve the interaction with syscons(4), port Linux nforce driver and future versions of the xbox. This supports the 64MB and 128MB boxes. You'll need the most recent CVS version of Cromwell (the Linux BIOS for the XBOX) to boot. Rink will be maintaining this port, and is interested in feedback. He's setup a website http://xbox-bsd.nl to report the latest developments. Any silly mistakes are my fault. Submitted by: Rink P.W. Springer rink at stack dot nl and Ed Schouten ed at fxq dot nl
Diffstat (limited to 'sys/isa/atrtc.c')
-rw-r--r--sys/isa/atrtc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index a4ae751..38b238f 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
#include "opt_clock.h"
#include "opt_isa.h"
#include "opt_mca.h"
+#include "opt_xbox.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -90,6 +91,10 @@ __FBSDID("$FreeBSD$");
#include <i386/bios/mca_machdep.h>
#endif
+#ifdef XBOX
+#include <machine/xbox.h>
+#endif
+
/*
* 32-bit time_t's can't reach leap years before 1904 or after 2036, so we
* can use a simple formula for leap years.
@@ -522,6 +527,11 @@ calibrate_clocks(void)
return (tot_count);
fail:
+#ifdef XBOX
+ if (arch_i386_is_xbox)
+ timer_freq = 1125000; /* gives ~733.34MHz CPU clock */
+#endif
+
if (bootverbose)
printf("failed, using default i8254 clock of %u Hz\n",
timer_freq);
OpenPOWER on IntegriCloud