comparison cos/kernel/kernel.c @ 35:bcb3b68c8147

Added bss end address and load end address to multiboot header
author windel
date Mon, 16 Jan 2012 17:38:00 +0100
parents 8012221dd740
children 91f91ff07ea8
comparison
equal deleted inserted replaced
34:8012221dd740 35:bcb3b68c8147
12 printf("Got b at %x\n", b); 12 printf("Got b at %x\n", b);
13 b[0] = 'B'; 13 b[0] = 'B';
14 kfree(a); 14 kfree(a);
15 } 15 }
16 16
17 uint64_t testvar = 1234; // Ends up in data section
18 uint64_t testvar2 = 0; // Ends up in bss section
19
17 multiboot_info_t *multiboot_info = 0; // Set by startup code. 20 multiboot_info_t *multiboot_info = 0; // Set by startup code.
18 21
19 /* This routine initializes the kernel. 22 /* This routine initializes the kernel.
20 * We are left here in 64-bit long mode with the first 6 MB identity mapped. 23 * We are left here in 64-bit long mode with the first 6 MB identity mapped.
21 * */ 24 * */
24 // No kmalloc required here yet: 27 // No kmalloc required here yet:
25 init_screen(); 28 init_screen();
26 setupIDT(); 29 setupIDT();
27 keyboard_init(); 30 keyboard_init();
28 timer_init(); 31 timer_init();
32
33 testvar++;
34 testvar2++;
35 printf("Test variable = %d, testvar2 = %d\n", testvar, testvar2);
29 36
30 /* Retrieve memory information from multiboot header */ 37 /* Retrieve memory information from multiboot header */
31 uint64_t available_memory = 0; 38 uint64_t available_memory = 0;
32 if ((multiboot_info->flags & (1<<6)) == (1<<6)) 39 if ((multiboot_info->flags & (1<<6)) == (1<<6))
33 { 40 {