[freenos] r401 committed - Renamed idt_entry_get() to idt_get_entry().

  • From: freenos@xxxxxxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Mon, 18 Oct 2010 23:55:43 +0000

Revision: 401
Author: nieklinnenbank
Date: Mon Oct 18 16:48:04 2010
Log: Renamed idt_entry_get() to idt_get_entry().

http://code.google.com/p/freenos/source/detail?r=401

Modified:
 /branches/scratch/include/x86/idt.h
 /branches/scratch/system/x86/pc/idt.c

=======================================
--- /branches/scratch/include/x86/idt.h Sun Oct 10 16:06:55 2010
+++ /branches/scratch/include/x86/idt.h Mon Oct 18 16:48:04 2010
@@ -44,7 +44,7 @@

 extern void idt_init(void);
 extern void idt_load(void);
-extern void idt_entry_set(u16 vector, u8 flags, addr_t isr);
+extern void idt_set_entry(u16 vector, u8 flags, addr_t isr);

 #endif /* __IDT_H */

=======================================
--- /branches/scratch/system/x86/pc/idt.c       Sun Oct 10 16:06:55 2010
+++ /branches/scratch/system/x86/pc/idt.c       Mon Oct 18 16:48:04 2010
@@ -29,42 +29,42 @@
     memset(idt, 0, sizeof(idt));

     /* Fill the IDT with exception handlers. */
-    idt_entry_set(0,  IDT_TRAP_GATE, (addr_t) i0);
-    idt_entry_set(1,  IDT_TRAP_GATE, (addr_t) i1);
-    idt_entry_set(2,  IDT_TRAP_GATE, (addr_t) i2);
-    idt_entry_set(3,  IDT_TRAP_GATE, (addr_t) i3);
-    idt_entry_set(4,  IDT_TRAP_GATE, (addr_t) i4);
-    idt_entry_set(5,  IDT_TRAP_GATE, (addr_t) i5);
-    idt_entry_set(6,  IDT_TRAP_GATE, (addr_t) i6);
-    idt_entry_set(7,  IDT_TRAP_GATE, (addr_t) i7);
-    idt_entry_set(8,  IDT_TRAP_GATE, (addr_t) i8);
-    idt_entry_set(9,  IDT_TRAP_GATE, (addr_t) i9);
-    idt_entry_set(10, IDT_TRAP_GATE, (addr_t) i10);
-    idt_entry_set(11, IDT_TRAP_GATE, (addr_t) i11);
-    idt_entry_set(12, IDT_TRAP_GATE, (addr_t) i12);
-    idt_entry_set(13, IDT_TRAP_GATE, (addr_t) i13);
-    idt_entry_set(14, IDT_TRAP_GATE, (addr_t) i14);
-    idt_entry_set(15, IDT_TRAP_GATE, (addr_t) i15);
-    idt_entry_set(16, IDT_TRAP_GATE, (addr_t) i16);
+    idt_set_entry(0,  IDT_TRAP_GATE, (addr_t) i0);
+    idt_set_entry(1,  IDT_TRAP_GATE, (addr_t) i1);
+    idt_set_entry(2,  IDT_TRAP_GATE, (addr_t) i2);
+    idt_set_entry(3,  IDT_TRAP_GATE, (addr_t) i3);
+    idt_set_entry(4,  IDT_TRAP_GATE, (addr_t) i4);
+    idt_set_entry(5,  IDT_TRAP_GATE, (addr_t) i5);
+    idt_set_entry(6,  IDT_TRAP_GATE, (addr_t) i6);
+    idt_set_entry(7,  IDT_TRAP_GATE, (addr_t) i7);
+    idt_set_entry(8,  IDT_TRAP_GATE, (addr_t) i8);
+    idt_set_entry(9,  IDT_TRAP_GATE, (addr_t) i9);
+    idt_set_entry(10, IDT_TRAP_GATE, (addr_t) i10);
+    idt_set_entry(11, IDT_TRAP_GATE, (addr_t) i11);
+    idt_set_entry(12, IDT_TRAP_GATE, (addr_t) i12);
+    idt_set_entry(13, IDT_TRAP_GATE, (addr_t) i13);
+    idt_set_entry(14, IDT_TRAP_GATE, (addr_t) i14);
+    idt_set_entry(15, IDT_TRAP_GATE, (addr_t) i15);
+    idt_set_entry(16, IDT_TRAP_GATE, (addr_t) i16);

     /* Fill IDT with hardware interrupt handlers. */
-    idt_entry_set(32, IDT_INT_GATE,  (addr_t) i32);
-    idt_entry_set(33, IDT_INT_GATE,  (addr_t) i33);
-    idt_entry_set(34, IDT_INT_GATE,  (addr_t) i34);
-    idt_entry_set(35, IDT_INT_GATE,  (addr_t) i35);
-    idt_entry_set(36, IDT_INT_GATE,  (addr_t) i36);
-    idt_entry_set(37, IDT_INT_GATE,  (addr_t) i37);
-    idt_entry_set(38, IDT_INT_GATE,  (addr_t) i38);
-    idt_entry_set(39, IDT_INT_GATE,  (addr_t) i39);
-    idt_entry_set(40, IDT_INT_GATE,  (addr_t) i40);
-    idt_entry_set(41, IDT_INT_GATE,  (addr_t) i41);
-    idt_entry_set(42, IDT_INT_GATE,  (addr_t) i42);
-    idt_entry_set(43, IDT_INT_GATE,  (addr_t) i43);
-    idt_entry_set(44, IDT_INT_GATE,  (addr_t) i44);
-    idt_entry_set(45, IDT_INT_GATE,  (addr_t) i45);
-    idt_entry_set(46, IDT_INT_GATE,  (addr_t) i46);
-    idt_entry_set(47, IDT_INT_GATE,  (addr_t) i47);
-    idt_entry_set(48, IDT_INT_GATE,  (addr_t) i48);
+    idt_set_entry(32, IDT_INT_GATE,  (addr_t) i32);
+    idt_set_entry(33, IDT_INT_GATE,  (addr_t) i33);
+    idt_set_entry(34, IDT_INT_GATE,  (addr_t) i34);
+    idt_set_entry(35, IDT_INT_GATE,  (addr_t) i35);
+    idt_set_entry(36, IDT_INT_GATE,  (addr_t) i36);
+    idt_set_entry(37, IDT_INT_GATE,  (addr_t) i37);
+    idt_set_entry(38, IDT_INT_GATE,  (addr_t) i38);
+    idt_set_entry(39, IDT_INT_GATE,  (addr_t) i39);
+    idt_set_entry(40, IDT_INT_GATE,  (addr_t) i40);
+    idt_set_entry(41, IDT_INT_GATE,  (addr_t) i41);
+    idt_set_entry(42, IDT_INT_GATE,  (addr_t) i42);
+    idt_set_entry(43, IDT_INT_GATE,  (addr_t) i43);
+    idt_set_entry(44, IDT_INT_GATE,  (addr_t) i44);
+    idt_set_entry(45, IDT_INT_GATE,  (addr_t) i45);
+    idt_set_entry(46, IDT_INT_GATE,  (addr_t) i46);
+    idt_set_entry(47, IDT_INT_GATE,  (addr_t) i47);
+    idt_set_entry(48, IDT_INT_GATE,  (addr_t) i48);
 }

 void idt_load(void)
@@ -79,10 +79,10 @@
     lidt(ptr);
 }

-void idt_entry_set(u16 vector, u8 flags, addr_t isr)
+void idt_set_entry(u16 vector, u8 flags, addr_t isr)
 {
     idt[vector].offset_low  = isr & 0xffff;
-    idt[vector].segment     = KERNEL_CS_SEL;
+    idt[vector].segment     = KERN_CS_SEL;
     idt[vector].reserved    = 0;
     idt[vector].flags       = flags;
     idt[vector].offset_high = (isr >> 16) & 0xffff;

Other related posts:

  • » [freenos] r401 committed - Renamed idt_entry_get() to idt_get_entry(). - freenos