Browse Source

Fixed debug messages

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
070f6c0b6b
1 changed files with 15 additions and 9 deletions
  1. 15
    9
      src/arch/i386/firmware/pcbios/basemem.c

+ 15
- 9
src/arch/i386/firmware/pcbios/basemem.c View File

79
 	 */
79
 	 */
80
 	memset ( ptr, 0, size_kb << 10 );
80
 	memset ( ptr, 0, size_kb << 10 );
81
 
81
 
82
-	DBG ( "Allocated %d kB of base memory at [%hx:0000,%hx:0000)\n",
83
-	      size_kb, ( fbms << 6 ), ( ( fbms + size_kb ) << 6 ) );
82
+	DBG ( "Allocated %d kB of base memory at [%hx:0000,%hx:0000), "
83
+	      "%d kB now free\n", size_kb,
84
+	      ( virt_to_phys ( ptr ) >> 4 ),
85
+	      ( ( virt_to_phys ( ptr ) + ( size_kb << 10 ) ) >> 4 ), fbms );
84
 
86
 
85
 	/* Update our memory map */
87
 	/* Update our memory map */
86
 	get_memsizes();
88
 	get_memsizes();
113
 		return; 
115
 		return; 
114
 	}
116
 	}
115
 
117
 
116
-	DBG ( "Trying to free %d bytes base memory at %hx:%hx\n", size,
118
+	DBG ( "Trying to free %d bytes base memory at %hx:%hx "
119
+	      "from %d kB free\n", size,
117
 	      ( virt_to_phys ( ptr - remainder ) >> 4 ),
120
 	      ( virt_to_phys ( ptr - remainder ) >> 4 ),
118
-	      ( virt_to_phys ( ptr - remainder ) & 0xf ) + remainder );
121
+	      ( virt_to_phys ( ptr - remainder ) & 0xf ) + remainder,
122
+	      fbms );
119
 
123
 
120
 	/* Mark every kilobyte within this block as free.  This is
124
 	/* Mark every kilobyte within this block as free.  This is
121
 	 * overkill for normal purposes, but helps when something has
125
 	 * overkill for normal purposes, but helps when something has
142
 
146
 
143
 	/* Update our memory map */
147
 	/* Update our memory map */
144
 	get_memsizes();
148
 	get_memsizes();
145
-
146
-	DBG ( "%d kB of base memory now free\n", fbms );
147
 }
149
 }
148
 
150
 
149
 /* Do the actual freeing of memory.  This is split out from
151
 /* Do the actual freeing of memory.  This is split out from
173
 		/* Return memory to BIOS */
175
 		/* Return memory to BIOS */
174
 		fbms += free_block->size_kb;
176
 		fbms += free_block->size_kb;
175
 
177
 
176
-		DBG ( "Freed %d kB of base memory at [%hx:0000,%hx:0000)\n",
177
-		      free_block->size_kb, ( fbms << 6 ),
178
-		      ( fbms + free_block->size_kb ) << 6 );
178
+		DBG ( "Freed %d kB of base memory at [%hx:0000,%hx:0000), "
179
+		      "%d kB now free\n",
180
+		      free_block->size_kb,
181
+		      ( virt_to_phys ( free_block ) >> 4 ),
182
+		      ( ( virt_to_phys ( free_block ) + 
183
+			  ( free_block->size_kb << 10 ) ) >> 4 ),
184
+		      fbms );
179
 		
185
 		
180
 		/* Do not zero out the freed block, because it might
186
 		/* Do not zero out the freed block, because it might
181
 		 * be the one containing librm, in which case we're
187
 		 * be the one containing librm, in which case we're

Loading…
Cancel
Save