- A couple of minor fixes (thx to W.Catteau)

This commit is contained in:
Jan Stoess 2008-10-21 00:29:44 -04:00
parent ffe30a6506
commit 1d2bedbe9f
5 changed files with 12 additions and 13 deletions

View File

@ -27,8 +27,7 @@ public:
{ {
struct { struct {
u16_t size; u16_t size;
word_t addr __attribute__((packed)); word_t addr __attribute__((packed));
u16_t pad[sizeof(word_t)-sizeof(u16_t)];
} descriptor; } descriptor;
u16_t selector; u16_t selector;
}; };

View File

@ -1,6 +1,6 @@
/********************************************************************* /*********************************************************************
* *
* Copyright (C) 2002-2005, 2007, Karlsruhe University * Copyright (C) 2002-2005, 2007-2008, Karlsruhe University
* *
* File path: arch/x86/tss.h * File path: arch/x86/tss.h
* Description: AMD64 Task State Segment * Description: AMD64 Task State Segment
@ -61,7 +61,7 @@ private:
u64_t reserved2; u64_t reserved2;
u16_t reserved3; u16_t reserved3;
u16_t iopbm_offset; u16_t iopbm_offset;
u8_t io_bitmap[IOPERMBITMAP_SIZE+1] X86_IOPERMBITMAP_ALIGNMENT; u8_t io_bitmap[IOPERMBITMAP_SIZE] X86_IOPERMBITMAP_ALIGNMENT;
u8_t stopper; u8_t stopper;
} __attribute__((packed)); } __attribute__((packed));

View File

@ -1,6 +1,6 @@
/********************************************************************* /*********************************************************************
* *
* Copyright (C) 2002, 2007, Karlsruhe University * Copyright (C) 2002, 2007-2008, Karlsruhe University
* *
* File path: arch/x86/x32/segdesc.h * File path: arch/x86/x32/segdesc.h
* Description: IA32 Segment Descriptor * Description: IA32 Segment Descriptor
@ -76,8 +76,8 @@ INLINE void x86_segdesc_t::set_seg(u32_t base, u32_t limit,
} }
else else
{ {
x.d.limit_low = limit & 0xFFFF; x.d.limit_low = limit & 0xFFFF;
x.d.limit_high = (limit >> 16) & 0xFF; x.d.limit_high = limit >> 16;
x.d.g = 0; /* 1B granularity */ x.d.g = 0; /* 1B granularity */
} }
@ -98,8 +98,8 @@ INLINE void x86_segdesc_t::set_seg(u32_t base, u32_t limit,
INLINE void x86_segdesc_t::set_sys(u32_t base, u32_t limit, INLINE void x86_segdesc_t::set_sys(u32_t base, u32_t limit,
int dpl, segtype_e type) int dpl, segtype_e type)
{ {
x.d.limit_low = limit & 0xFFFF; x.d.limit_low = limit & 0xFFFF;
x.d.limit_high = (limit >> 16) & 0xFF; x.d.limit_high = limit >> 16;
x.d.base_low = base & 0xFFFFFF; x.d.base_low = base & 0xFFFFFF;
x.d.base_high = (base >> 24) & 0xFF; x.d.base_high = (base >> 24) & 0xFF;
x.d.type = type; x.d.type = type;

View File

@ -1,6 +1,6 @@
/********************************************************************* /*********************************************************************
* *
* Copyright (C) 2002, 2005, 2007, Karlsruhe University * Copyright (C) 2002, 2005, 2007-2008, Karlsruhe University
* *
* File path: arch/x86/x32/tss.h * File path: arch/x86/x32/tss.h
* Description: IA32 Task State Segment * Description: IA32 Task State Segment
@ -64,7 +64,7 @@ private:
u32_t ldt; u32_t ldt;
u16_t trace; u16_t trace;
u16_t iopbm_offset; u16_t iopbm_offset;
u8_t io_bitmap[IOPERMBITMAP_SIZE+1] X86_X32_IOPERMBITMAP_ALIGNMENT; u8_t io_bitmap[IOPERMBITMAP_SIZE] X86_X32_IOPERMBITMAP_ALIGNMENT;
u8_t stopper; u8_t stopper;
}; };

View File

@ -1,6 +1,6 @@
/********************************************************************* /*********************************************************************
* *
* Copyright (C) 2002-2005, 2007, Karlsruhe University * Copyright (C) 2002-2005, 2007-2008, Karlsruhe University
* *
* File path: arch/x86/x64/tss.h * File path: arch/x86/x64/tss.h
* Description: AMD64 Task State Segment * Description: AMD64 Task State Segment
@ -61,7 +61,7 @@ private:
u64_t reserved2; u64_t reserved2;
u16_t reserved3; u16_t reserved3;
u16_t iopbm_offset; u16_t iopbm_offset;
u8_t io_bitmap[IOPERMBITMAP_SIZE+1] AMD64_IOPERMBITMAP_ALIGNMENT; u8_t io_bitmap[IOPERMBITMAP_SIZE] AMD64_IOPERMBITMAP_ALIGNMENT;
u8_t stopper; u8_t stopper;
} __attribute__((packed)); } __attribute__((packed));