Bladeren bron

Added debug messages

tags/v0.9.3
Michael Brown 19 jaren geleden
bovenliggende
commit
a76b9c3f19
1 gewijzigde bestanden met toevoegingen van 5 en 0 verwijderingen
  1. 5
    0
      src/arch/i386/core/load_buffer.c

+ 5
- 0
src/arch/i386/core/load_buffer.c Bestand weergeven

@@ -18,6 +18,7 @@
18 18
 int init_load_buffer ( struct buffer *buffer ) {
19 19
 	buffer->start = 0x7c00;
20 20
 	buffer->end = 0xa0000;
21
+	DBG ( "LOAD_BUFFER using [%x,%x)\n", buffer->start, buffer->end );
21 22
 	init_buffer ( buffer );
22 23
 	return 1;
23 24
 }
@@ -46,6 +47,7 @@ int init_load_buffer ( struct buffer *buffer ) {
46 47
 
47 48
 	buffer->start = virt_to_phys ( data );
48 49
 	buffer->end = buffer->start + size;
50
+	DBG ( "LOAD_BUFFER using [%x,%x)\n", buffer->start, buffer->end );
49 51
 	init_buffer ( buffer );
50 52
 	return 1;
51 53
 }
@@ -55,11 +57,14 @@ void trim_load_buffer ( struct buffer *buffer ) {
55 57
 
56 58
 	/* Shrink buffer */
57 59
 	new_start = erealloc ( phys_to_virt ( buffer->start ), buffer->fill );
60
+	DBG ( "LOAD_BUFFER shrunk from [%x,%x) to [%x,%x)\n", buffer->start,
61
+	      buffer->end, virt_to_phys ( new_start ), buffer->end );
58 62
 	buffer->start = virt_to_phys ( new_start );
59 63
 }
60 64
 
61 65
 void done_load_buffer ( struct buffer *buffer ) {
62 66
 	efree ( phys_to_virt ( buffer->start ) );
67
+	DBG ( "LOAD_BUFFER freed [%x,%x)\n", buffer->start, buffer->end );
63 68
 }
64 69
 
65 70
 #endif

Laden…
Annuleren
Opslaan