00001
00002
00003
00004 #define __VMDEBUG 0 // Kernel Virtual Memory Debug
00005 #define __KMM_DEBUG 0 // Kernel Memory Manager Debug
00006 #define __8254_DEBUG 1 // 8254 Debug
00007
00008
00009
00010 #define _debug(valor) \
00011 __asm__ __volatile__ ( \
00012 "sigue: \n\t" \
00013 " movw %0, %%ax\n\t" \
00014 " decw %%ax\n\t" \
00015 " jnz sigue\n\t" \
00016 : : "i" (valor) : "ax" );
00017
00018 #define __debug() __asm__ __volatile__ ("push %eax; \
00019 movl $1, %eax; \
00020 debug1: cmp $1, %eax; \
00021 nop; \
00022 je debug1; \
00023 pop %eax");
00024
00025
00026 #define START_TICKS_COUNT() ticks_t start_ticks_count, end_ticks_count; \
00027 rdtscl(start_ticks_count);
00028 #define END_TICKS_COUNT() rdtscl(end_ticks_count)
00029 #define PRINT_TICKS_COUNT() kprintf("Cantidad de ticks: %d\n", end_ticks_count - start_ticks_count);