Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1802156
  • 博文数量: 286
  • 博客积分: 3713
  • 博客等级: 少校
  • 技术积分: 2275
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-11 09:47
个人简介

http://blog.chinaunix.net/uid/16979052.html

文章分类

全部博文(286)

文章存档

2018年(1)

2017年(16)

2016年(9)

2015年(17)

2014年(15)

2013年(112)

2012年(116)

发布时间:2012-06-28 08:11:11

#ifndef KERNAL_TYPES_INCLUDED#define KERNAL_TYPES_INCLUDEDtypedef unsigned char uint8_t;typedef char int8_t;typedef unsigned short uint16_t;typedef short int16_t;typedef unsigned int uint32_t;typedef int int32_t;typedef unsigned long long uint64_t;typedef l.........【阅读全文】

阅读(978) | 评论(0) | 转发(0)

发布时间:2012-06-27 17:21:44

#ifndef PLATFORM_H_INCLUDED#define PLATFORM_H_INCLUDED#define STACK_SIZE 4096 /*struct thread_t size is 2K*/#define PAGE_SIZE  4096/*Segment*/#define GDT_SEL(gdt)    ((gdt) << 3)#define GDT_NULL        0#define GDT_KERNEL_CS  .........【阅读全文】

阅读(3808) | 评论(0) | 转发(0)

发布时间:2012-06-27 17:14:56

#include #include #include static int early_serial_base = 0x3f8;  /*ttyS0*/#define XMTRDY 0x20#define DLAB 0x80#define TXR 0 /*Transmit register(WRITE)*/#define RXR 0 /*Receive register(READ)*/#define IER 1 /*Interrupt Enable*/#define IIR 2 /*Interrupt.........【阅读全文】

阅读(1366) | 评论(0) | 转发(0)

发布时间:2012-06-27 10:48:23

#include #include /*Check if the bit BIT in FLAGS is set.*/#define CHECK_FLAG(flags,bit) ((flags) & (1 << (bit)))struct MultibootInfo bootInfo;extern void early_serial_init();void setup_param(uint8_t *addr, int magic){ early_serial_init(); struct Multiboot.........【阅读全文】

阅读(1545) | 评论(0) | 转发(0)

发布时间:2012-06-27 10:45:51

#include .global multiboot_entry.section .boot/*Multiboot header, 32-bit aligned.*/.align 4 .long (MULTIBOOT_HEADER_MAGIC) .long (MULTIBOOT_HEADER_FLAGS) .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS).align 4multiboot_entry: mov $boot_sta.........【阅读全文】

阅读(1056) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册