Browse Source

Added debug messages

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
a76b9c3f19
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/arch/i386/core/load_buffer.c

+ 5
- 0
src/arch/i386/core/load_buffer.c View File

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

Loading…
Cancel
Save