summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test36.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/romcc/tests/simple_test36.c')
-rw-r--r--util/romcc/tests/simple_test36.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/util/romcc/tests/simple_test36.c b/util/romcc/tests/simple_test36.c
new file mode 100644
index 0000000000..9044bda7b9
--- /dev/null
+++ b/util/romcc/tests/simple_test36.c
@@ -0,0 +1,41 @@
+static void order_dimms(void)
+{
+ unsigned long tom;
+
+ tom = 0;
+ for(;;) {
+
+ unsigned csbase, csmask;
+ unsigned size;
+ unsigned index;
+ csbase = 0;
+
+ for(index = 0; index < 1; index++) {
+ csbase = __builtin_inl(0x40);
+ }
+ if (csbase == 0) {
+ break;
+ }
+
+
+ size = csbase;
+
+ csbase = (tom << 21);
+
+ tom += size;
+
+
+ csmask = size;
+ csmask |= 0xfe00;
+
+
+ __builtin_outl(csbase, 0xCFC);
+
+ __builtin_outl(0xc260, 0xCF8);
+ __builtin_outl(csmask, 0xCFC);
+ }
+
+ tom &= ~0xff000000;
+
+ __builtin_outl(tom, 0x1234);
+}