[PATCH 07/12] x86: Add a static initializer for IDTs | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Add static intializer for IDT entries.
Signed-off-by: Joe Damato <ice799@xxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
[Site Home] [Audio] [Hams] [Kernel Newbies] [Memory] [Security] [Netfilter] [Bugtraq] [Writing Drivers] [Photo] [Yosemite Photos] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Samba] [Video 4 Linux] [Linux Resources] [Fedora Users]
![]() |