idt_table的大小
struct Xgt_desc_struct {
unsigned short size;
unsigned long address __attribute__((packed));
unsigned short pad;
} __attribute__ ((packed));
extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
struct desc_struct {
unsigned long a,b;
};
struct desc_struct idt_table[256] __attribute__((__section__(".data.idt"))) = { {0, 0}, };
idt_descr:
.word IDT_ENTRIES*8-1 # idt contains 256 entries
.long idt_table
请问为什么最后汇编初始化 idt_descr的size是“ .word IDT_ENTRIES*8-1”, 这里为什么要减去1呢?