Rev 3930 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3930 | Rev 3972 | ||
---|---|---|---|
Line 152... | Line 152... | ||
152 | } |
152 | } |
153 | 153 | ||
154 | /* |
154 | /* |
155 | * Prepare new GDT for CPU in question. |
155 | * Prepare new GDT for CPU in question. |
156 | */ |
156 | */ |
- | 157 | ||
- | 158 | /* XXX Flag FRAME_LOW_4_GiB was removed temporarily, |
|
- | 159 | * it needs to be replaced by a generic fuctionality of |
|
- | 160 | * the memory subsystem |
|
- | 161 | */ |
|
157 | gdt_new = (struct descriptor *) malloc(GDT_ITEMS * |
162 | gdt_new = (struct descriptor *) malloc(GDT_ITEMS * |
158 | sizeof(struct descriptor), FRAME_ATOMIC | FRAME_LOW_4_GiB); |
163 | sizeof(struct descriptor), FRAME_ATOMIC); |
159 | if (!gdt_new) |
164 | if (!gdt_new) |
160 | panic("Cannot allocate memory for GDT."); |
165 | panic("Cannot allocate memory for GDT."); |
161 | 166 | ||
162 | memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor)); |
167 | memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor)); |
163 | memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0); |
168 | memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0); |