patch.diff.txt
| 1 | diff --git a/sys/cpu/i386/include/segments.h b/sys/cpu/i386/include/segments.h |
|---|---|
| 2 | index 4e19db2..adfe648 100644 |
| 3 | --- a/sys/cpu/i386/include/segments.h |
| 4 | +++ b/sys/cpu/i386/include/segments.h |
| 5 | @@ -199,7 +199,7 @@ struct region_descriptor {
|
| 6 | #define SEGEX_IDT 0x02 /* interrupt descriptor table */ |
| 7 | #define SEGEX_TI 0x04 /* local descriptor table */ |
| 8 | /* other bits are affected descriptor index */ |
| 9 | -#define SEGEX_IDX(s) ((s)>>3)&0x1fff) |
| 10 | +#define SEGEX_IDX(s) (((s)>>3)&0x1fff) |
| 11 | |
| 12 | /* |
| 13 | * Size of IDT table. Theoretically we only need to cover past 0x81 |
| 14 | diff --git a/sys/cpu/x86_64/include/segments.h b/sys/cpu/x86_64/include/segments.h |
| 15 | index b8dccf1..06408c3 100644 |
| 16 | --- a/sys/cpu/x86_64/include/segments.h |
| 17 | +++ b/sys/cpu/x86_64/include/segments.h |
| 18 | @@ -210,7 +210,7 @@ struct region_descriptor {
|
| 19 | #define SEGEX_IDT 0x02 /* interrupt descriptor table */ |
| 20 | #define SEGEX_TI 0x04 /* local descriptor table */ |
| 21 | /* other bits are affected descriptor index */ |
| 22 | -#define SEGEX_IDX(s) ((s)>>3)&0x1fff) |
| 23 | +#define SEGEX_IDX(s) (((s)>>3)&0x1fff) |
| 24 | |
| 25 | /* |
| 26 | * Size of the IDT table. Theoretically we only need to cover past 0x81 |