EmbLogic's Blog

Author Archives: gaurav

IDT Table

The IDT is stored in the idt_table table, which includes 256 entries. The 6-byte idt_descr variable specifies both the size of the IDT and its address, it is used only when the kernel initializes the idtr register with the lidt … Continue reading →

Posted in Uncategorized | Leave a comment

Interrupt gate

An Intel interrupt gate that cannot be accessed by a User Mode process (the gate’s DPL field is equal to 0). All Linux interrupt handlers are activated by means of interrupt gates, and all are restricted to Kernel Mode.

Posted in Uncategorized | Leave a comment

Interrupt Handling

All interrupt handlers perform the same four basic actions: 1. Save the IRQ value and the registers contents in the Kernel Mode stack. 2. Send an acknowledgment to the PIC that is servicing the IRQ line, thus allowing it to … Continue reading →

Posted in Uncategorized | Leave a comment

Interrupt Descriptor table

A system table called Interrupt Descriptor Table (IDT) associates each interrupt or exception vector with the address of the corresponding interrupt or exception handler. The IDT must be properly initialized before the kernel enables interrupts. The IDT format is similar … Continue reading →

Posted in Uncategorized | Leave a comment

IRQ’S

Each hardware device controller capable of issuing interrupt requests has an output line designated as an IRQ (Interrupt ReQuest). All existing IRQ lines are connected to the input pins of a hardware circuit called the Interrupt Controller, which performs the … Continue reading →

Posted in Uncategorized | Leave a comment

Extended Paging

Starting with the Pentium model, Intel 80×86 microprocessors introduce extended paging , which allows page frames to be either 4 KB or 4 MB in size.Extended paging is enabled by setting the Page Size flag of a Page Directory entry.The … Continue reading →

Posted in Uncategorized | Leave a comment

vmalloc

vmalloc allocates a contiguous memory region in the virtual address space. Although the pages are not con-secutive in physical memory (each page is retrieved with a separate call to alloc_page),the kernel sees them as a contiguous range of addresses. vmalloc … Continue reading →

Posted in Uncategorized | 1 Comment

Translation Lookaside Buffers (TLB)

Besides general-purpose hardware caches, Intel 80×86 processors include other caches called translation lookaside buffers or TLB to speed up linear address translation. When a linear address is used for the first time, the corresponding physical address is computed through slow … Continue reading →

Posted in Uncategorized | Leave a comment

Process Descriptor

In order to manage processes, the kernel must have a clear picture of what each process is doing. It must know, for instance, the process’s priority, whether it is running on the CPU or blocked on some event, what address … Continue reading →

Posted in Uncategorized | Leave a comment

Paging.

For the sake of efficiency, linear addresses are grouped in fixed-length intervals called pages; contiguous linear addresses within a page are mapped into contiguous physical addresses. In this way, the kernel can specify the physical address and the access rights … Continue reading →

Posted in Uncategorized | Leave a comment

Paging in Hardware

The paging unit thinks of all RAM as partitioned into fixed-length page frames (they are sometimes referred to as physical pages). Each page frame contains a page, that is, the length of a page frame coincides with that of a … Continue reading →

Posted in Uncategorized | Leave a comment

The process list

To allow an efficient search through processes of a given type (for instance, all processes in a runnable state) the kernel creates several lists of processes. Each list consists of pointers to process descriptors. A list pointer (that is, the … Continue reading →

Posted in Uncategorized | Leave a comment

Segmentation in Hardware(for 80386)

A logical address consists of two parts: a segment identifier and an offset that specifies the relative address within the segment. The segment identifier is a 16-bit field called Segment Selector, while the offset is a 32-bit field. To make … Continue reading →

Posted in Uncategorized | Leave a comment

NAND and NOR

Flash devices, including NOR flash devices such as CFI flash chips and NAND flash devices such as the DOC, are not like disk storage devices. They cannot be written to and read from arbitrarily. To understand how to operate flash … Continue reading →

Posted in Uncategorized | 1 Comment

How do I change stack frames?

?? (gdb) backtrace #0 func2 (x=30) at test.c:5 #1 0x80483e6 in func1 (a=30) at test.c:10 #2 0×8048414 in main (argc=1, argv=0xbffffaf4) at test.c:19 #3 0x40037f5c in __libc_start_main () from /lib/libc.so.6 (gdb) ? Use the gdb command frame. Notice in the … Continue reading →

Posted in Uncategorized | Leave a comment