lkml.org 
[lkml]   [2008]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/12] x86: Add a static initializer for IDTs
Date
Add static intializer for IDT entries.

Signed-off-by: Joe Damato <ice799@gmail.com>
---
include/asm-x86/desc_defs.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h
index d6a5310..a1c6516 100644
--- a/include/asm-x86/desc_defs.h
+++ b/include/asm-x86/desc_defs.h
@@ -82,6 +82,15 @@ typedef struct desc_struct tss_desc;
#define ldttss_offset(d) (((d).base2 << 24 ) | ((d).base1 << 16) |\
((d).base0 & 0x0000ffff))
#define ldttss_limit(d) ((d).limit0)
+#define __IDT_INITIALIZER(lo,hi) \
+ { .base0 = lo & 0xffff \
+ , .seg_sel = (lo >> 16) & 0xffff \
+ , .reserved = 0 \
+ , .type = (hi >> 8) & 0xf \
+ , .zero = 0 \
+ , .dpl = (hi >> 13) & 3 \
+ , .p = (hi >> 15) & 1 \
+ , .base1 = (hi >> 16) & 0xffff }
#endif

struct desc_ptr {
--
1.5.4.3


\
 
 \ /
  Last update: 2008-10-25 05:35    [W:1.068 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site