PERFORCE change 29834 for review

Juli Mallett jmallett at FreeBSD.org
Sat Apr 26 16:39:35 PDT 2003


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

Change 29834 by jmallett at jmallett_dalek on 2003/04/26 16:38:53

	Fill out phys_avail table.

Affected files ...

.. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#9 edit

Differences ...

==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#9 (text+ko) ====

@@ -36,6 +36,9 @@
 
 #include <platform/models.h>
 
+#include <vm/vm.h>
+#include <vm/vm_page.h>
+
 #include <dev/arcbios/arcbios.h>
 #include <dev/arcbios/arcbiosvar.h>
 
@@ -71,7 +74,7 @@
 	struct arcbios_mem *mem;
 	struct machine_type *mtp;
 	const char *cpufreq;
-	int first, i, last, size;
+	int first, i, j, last, size;
 
 	/*
 	 * Initialise the ARCBIOS stuff.
@@ -98,6 +101,7 @@
 	       arcbios_system_identifier, mach_type, mach_subtype, mach_boardrev, cpufreq);
 
 	mem = NULL;
+	j = 0;
 	for (i = 0;; i++) {
 		mem = ARCBIOS->GetMemoryDescriptor(mem);
 
@@ -113,6 +117,15 @@
 		case ARCBIOS_MEM_FirmwarePermanent:
 			arcsmem += btoc(size);
 			break;
+		case ARCBIOS_MEM_FreeContiguous:
+		case ARCBIOS_MEM_FreeMemory:
+			printf("Physical available block %d:\n", j);
+			printf("Available memory range %0x-%0x\n",
+			       first, last);
+			phys_avail[j + 0] = first;
+			phys_avail[j + 1] = last;
+			j += 2;
+			break;
 		default:
 			printf("Memory range %0x-%0x type %d\n",
 			       first, last, mem->Type);


More information about the p4-projects mailing list