Changeset 4160 for libcaca/trunk


Ignore:
Timestamp:
Dec 20, 2009, 5:29:24 PM (10 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Fix libcaca.a linkage (was off by one argument), fill memory with 0xCACA, because caca is so delicious.
Location:
libcaca/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/build-kernel

    r4159 r4160  
    5858
    5959# Link everything but bootsector, kernel.o MUST be at the very end
    60 ld --oformat binary -Ttext 1000 stage2.o gdt.o pic.o int.o idt.o interruptions.o keyboard.o memory.o timer.o floppy.o processor.o klibc.o kernel.o -Map kernel.map ../caca/.libs/libcaca.a   -o kern.bin
     60ld --oformat binary -Ttext 1000 stage2.o gdt.o pic.o int.o idt.o interruptions.o keyboard.o memory.o timer.o floppy.o processor.o klibc.o kernel.o ../caca/.libs/libcaca.a -Map kernel.map    -o kern.bin
    6161   
    6262ls -ail kern.bin
  • libcaca/trunk/kernel/drivers/processor.c

    r4159 r4160  
    8686    printf("CPU%d\n", processor_info->id);
    8787    printf("Vendor ID : %s\n", processor_info->vendor);
     88    printf("Frequency : ");
    8889    if (processor_info->frequency > 1000000000)
    8990    {
    90         printf("Frequency : ~%dGhz (or something like that)\n",
     91        printf("%dGhz",
    9192               processor_info->frequency / 1000000000);
    9293    }
    9394    else if (processor_info->frequency > 1000000)
    9495    {
    95         printf("Frequency : ~%dMhz (or something like that)\n",
     96        printf("%dMhz",
    9697               processor_info->frequency / 1000000);
    9798    }
    9899    else if (processor_info->frequency > 1000)
    99100    {
    100         printf("Frequency : ~%dKhz (or something like that)\n",
     101        printf("%dKhz\n",
    101102               processor_info->frequency / 1000);
    102103    }
    103104    else
    104105    {
    105         printf("Frequency : ~%dhz (you must be running Bochs)\n",
     106        printf("%dhz\n",
    106107               processor_info->frequency);
    107108    }
     109    printf(" (or something like that)\n");
    108110    printf("Features : 0x%x\n", processor_info->features);
    109111}
  • libcaca/trunk/kernel/kernel.c

    r4159 r4160  
    2828
    2929extern char const * const * caca_get_display_driver_list(void);
     30extern char end[];
    3031
    3132/* C entry point, called from stage2 */
     
    3738    printf("_start at 0x%x\n", _start);
    3839    printf("kmain() at 0x%x\n", kmain);
    39     printf("Types : char[%d] int[%d] long[%d] unsigned long long[%d]\n", sizeof(char), sizeof(int), sizeof(long), sizeof(unsigned long long));
     40    printf("Types : char[%d] short[%d] int[%d] unsigned long long[%d]\n", sizeof(char), sizeof(short), sizeof(int), sizeof(unsigned long long));
    4041   
    4142    enable_interrupt(1);  // Enable Keyboard Interrupt (IRQ1)
     
    5152    floppy_print_info(&floppy_info);
    5253
    53     //caca_get_display_driver_list();
    54     printf("Entering kernel infinite loop.\n");
     54    /* Caca is delicious */
     55    printf("Filling memory with 0xCACA, starting from 0x%x\n", end);
    5556   
     57    char *ptr = end;
    5658    while (1)
    5759    {
    58        
     60        *ptr = 0xCA;
     61        *ptr++;
    5962    }
    6063}
    6164
     65char end[];
    6266
    6367#endif /* __KERNEL__ */
Note: See TracChangeset for help on using the changeset viewer.