http://blog.chinaunix.net/uid/16979052.html
全部博文(286)
发布时间:2012-06-28 15:36:53
#include static gdt_t ALIGN(PAGE_SIZE) gdt;static gdt_ptr_t ALIGN(PAGE_SIZE) gdt_ptr;void gdt_set_entry(uint32_t index, addr_t base, uint32_t limit, uint32_t type){ gdt_entry_t *g = &(gdt.entries[index]); g->limit_low = (limit / 4096.........【阅读全文】
发布时间:2012-06-28 08:14:57
#include void thread1(unsigned int val){ KPRINTF("val = %d\n", val); for(;;) KPRINTF("-");}void thread2(unsigned int val){ KPRINTF("val = %d\n", val); for(;;) KPRINTF("+");}void thread3(unsigned int val){ KPRINTF("val = %d\n", val);.........【阅读全文】
发布时间:2012-06-28 08:14:05
KERNELC := $(shell find kernel libc boot dev -name "*.c")KERNELASM := $(shell find kernel boot -name "*.S")EXE=vmlinuxCC = gccLD = ldRM = rm######################################################################KERNELOBJ= $(KERNELASM:.S=.o) $(KERNELC:.c=.o).........【阅读全文】
发布时间:2012-06-28 08:12:59
ENTRY(multiboot_entry)OUTPUT_FORMAT("elf32-i386")phys = 0x00100000; /*1 meg*/virt = 0;SECTIONS{ . = virt + phys; kernelStart = .; .text : { *(.boot) *(.task0) *(.text) *(.rdata) *(.rodata .rodata.*) kernel_size = .; LONG(kernelE.........【阅读全文】
发布时间:2012-06-28 08:12:11
#include .text.global wrappers.macro ISRNOERROR func,nr.align 4 \func: pushl $0 pushl $\nr jmp error_code.endm.macro ISR__ERROR func,nr.align 4 \func: pushl $\nr jmp error_code.endm.align 4error_code: pusha.........【阅读全文】