PERFORCE change 136934 for review

Randall R. Stewart rrs at FreeBSD.org
Wed Mar 5 18:13:41 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=136934

Change 136934 by rrs at rrs-mips2-jnpr on 2008/03/05 18:12:57

	Turn off un-aligned access also no extra memory
	       until I sort out the rgmii driver and pow some more.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#19 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#19 (text+ko) ====

@@ -808,6 +808,8 @@
 	octeon_set_interrupts(cpu_status_bits);
 }
 
+void octeon_set_unaligned(uint64_t *old);
+void octeon_clr_unaligned(uint64_t *old);
 
 static void
 mips_platform_init(void)
@@ -1251,6 +1253,7 @@
 	 *
 	 */
 	physmem = btoc(phys_avail[1] - phys_avail[0]);
+#ifdef GAHHHHHHH
 	if ((octeon_board_real()) &&
 	    (realmem_bytes > OCTEON_DRAM_FIRST_256_END)) {
 		/* take out the upper non-cached 1/2 */
@@ -1264,8 +1267,11 @@
 		    phys_avail[2], phys_avail[3]);
 		physmem += btoc(phys_avail[3] - phys_avail[2]);
 	} else {
+#endif
 		printf("realmem_bytes is %d\n", realmem_bytes);
+#ifdef GAHHHHHHH
 	}
+#endif	
 	realmem = physmem;
 
 	printf("\nCode: _start 0x%X  _end 0x%X", (uint32_t) (&_start), (uint32_t) (&end));
@@ -1332,6 +1338,7 @@
 {
 	vm_offset_t kernend;
 	uint64_t platform_counter_freq;
+	uint64_t oldval;
 
 	mips_platform_init();
 
@@ -1346,8 +1353,14 @@
 	cninit();
 	mips_boot_params_init();
 	printf(" Initialized memory: 0x%p  to  0x%lX\n", &edata, ((long)&edata) + ((long)kernend - (long)(&edata)));
-
+	oldval = 0;
+	/* Lets leave unaligned access not working like normal mips for now */
+	octeon_clr_unaligned(&oldval);
+	/*
+	 * Uncomment this to get unaligned access in hardware.
+ 	octeon_set_unaligned(&oldval);
+	*/
 	mips_init();
 	platform_counter_freq = (uint64_t) (octeon_get_clock_rate());
-	mips_timer_init_params(platform_counter_freq, 0);
+ 	mips_timer_init_params(platform_counter_freq, 0);
 }


More information about the p4-projects mailing list