Why I can't print?
Posted: Sun Sep 10, 2006 6:39 am
I use following code to print my memory:
And I found a strange thing:
This code works fine in other places(it can scroll the screen) .
When I test in bochs and qemu, they work fine;
When I test in the real hardware, it only print 3 memory areas(total 9 areas)
When I add the last printk(commented), it can printk 6 memory areas....
Why?
Code: Select all
void prt_mem_info()
{
unsigned long size = e820_size;
printk("There is total %i memory areas\n", size);
printk("BaseAddr\tLength\tType\n");
unsigned long i, j, * ptr;
for (i = 0; i < size; i++) {
ptr = (unsigned long *)(e820_graph + i);
printk("0x%x%x\t0x%x%x\t%u\n",
ptr[1], ptr[0],
ptr[3], ptr[2],
e820_graph[i].type);
//printk("This is index %i\n", i);
}
}
This code works fine in other places(it can scroll the screen) .
When I test in bochs and qemu, they work fine;
When I test in the real hardware, it only print 3 memory areas(total 9 areas)
When I add the last printk(commented), it can printk 6 memory areas....
Why?