上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页
摘要: [转]修复ubutnu12.04+win7的grub2引导原文位置:http://wenku.baidu.com/view/b6b7c9926bec0975f465e2f8.htmlps:我使用的是ubuntu12.04+win7操作系统,但是在重装win7后,ubuntu已经被隐藏了。因此需修复grub2。依据原文进行修改。使用liveCD,进入tryubuntu,然后等待系统初始完成。打开虚拟终端,输入如下内容:#sudo-i#fdisk-l可在此处找到到一个linux的分区,如果你不清楚自己的ubuntu安装在哪个分区位置,这个就可以看到。#mount/dev/sda7/mnt我的ubu 阅读全文
posted @ 2013-10-17 16:44 jeremyatchina 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 前提:已裝好Fedora 6 core 2.6.18 ,在Fedora 6 中compile linux kernel。1.下載 Fedora 6 core 2.6.18 http://www.kernel.org/ ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz22.解壓縮linux-2.6.18.tar.bz2 ,進入解壓縮的目錄make cleancp /usr/src/kernels/2.6.18-1.2798.fc6-i586/.config .make oldconfigmake -j4 ... 阅读全文
posted @ 2013-10-17 12:08 jeremyatchina 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 初探linux中断系统(2)中断系统初始化的过程用来初始化中断系统的函数位于arch/x86/kernel/irqinit.c,定义如下void __init init_IRQ(void){ int i; /* * On cpu 0, Assign IRQ0_VECTOR..IRQ15_VECTOR's to IRQ 0..15. * If these IRQ's are handled by legacy interrupt-controllers like PIC, * then this configuration will likely be sta... 阅读全文
posted @ 2013-10-17 10:20 jeremyatchina 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 1. 重要接口LDD上说,“内核维护了一个中断信号线的注册表,该注册表类似于I/O端口的注册表。模块在使用中断前要先请求一个中断通道(或者中断请求IRQ),然后在使用后释放该通道。”撇开系统如何遍历各个设备进行初始化,上面两句话说的实际上就是指两个接口函数:externint __must_check request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, constchar*name, void*dev); externvoid free_irq(unsigned int, void*);顾名思义,以 阅读全文
posted @ 2013-10-17 10:19 jeremyatchina 阅读(402) 评论(0) 推荐(0) 编辑
摘要: Regular expression 被實作於各種語言中,可以用來對字串做比對 擷取 分隔 這幾類的處理。以下是 JavaScript的處理範例。各位看官,可以按F12開啟 brower 的development tool 的console line 試試。/\d{4}-\d{2}-\d{2}/.test('2007-01-25'); // true'2007-01-25'.match(/\d{4}-\d{2}-\d{2}/); // truevar datePart = '2007-01-25'.match(/(\d{4})-(\d{2})-( 阅读全文
posted @ 2013-10-14 19:42 jeremyatchina 阅读(250) 评论(0) 推荐(0) 编辑
摘要: IDT表的初始化linux内核的中断描述符表IDT是一个全局的数据,在i386平台上被定义为:struct desc_struct idt_table[256] __attribute__((__section__(".data.idt"))) = { {0, 0}, };(摘自arch/kernel/i386/traps.c)其中每一个表项均是一个desc_struct结构,该结构被定以为:struct desc_struct {unsigned long a,b;};(摘自/inlcude/asm-i386/processor.h)。可以看出IDT表共256个表项,每一 阅读全文
posted @ 2013-10-14 17:11 jeremyatchina 阅读(829) 评论(0) 推荐(0) 编辑
摘要: 要使用中断肯定得初始化,这些初始化在系统启动时已经为你做好了,但是我们还是来看看怎样初始化的,这样就能更好的理解中断机制了。先看下面函数:355void__init init_ISA_irqs(void)356{357inti;358//省略了一些代码362 init_8259A(0);363364for(i=0;ichip=chip;}函数__set_irq_handler()定义如下(kernel/irq/chip.c):void__set_irq_handler(unsignedintirq,irq_flow_handler_t handle,intis_chained,constcha 阅读全文
posted @ 2013-10-14 17:01 jeremyatchina 阅读(654) 评论(0) 推荐(0) 编辑
摘要: Address operand syntaxThere are up to 4 parameters of an address operand that are presented in the syntaxdisplacement(base register, offset register, scalar multiplier). This is equivalent to[base register + displacement + offset register * scalar multiplier]in Intel syntax. Either or both of the nu 阅读全文
posted @ 2013-10-06 17:37 jeremyatchina 阅读(270) 评论(1) 推荐(0) 编辑
摘要: 紀錄 Terminal 下指令的過程http://asciinema.org/ 阅读全文
posted @ 2013-10-05 12:22 jeremyatchina 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 在Protected Mode下,一个重要的必不可少的数据结构就是GDT(Global Descriptor Table)。为什么要有GDT?我们首先考虑一下在Real Mode下的编程模型:在Real Mode下,我们对一个内存地址的访问是通过Segment:Offset的方式来进行的,其中Segment是一个段的Base Address,一个Segment的最大长度是64 KB,这是16-bit系统所能表示的最大长度。而Offset则是相对于此Segment Base Address的偏移量。Base Address+Offset就是一个内存绝对地址。由此,我们可以看出,一个段具备两个因素 阅读全文
posted @ 2013-09-30 09:26 jeremyatchina 阅读(388) 评论(1) 推荐(1) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页