Rev 1187 | Rev 1189 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1187 | Rev 1188 | ||
---|---|---|---|
Line 214... | Line 214... | ||
214 | } |
214 | } |
215 | 215 | ||
216 | void set_tls_desc(__address tls) |
216 | void set_tls_desc(__address tls) |
217 | { |
217 | { |
218 | ptr_16_32_t cpugdtr; |
218 | ptr_16_32_t cpugdtr; |
219 | descriptor_t *gdt_p = (descriptor_t *) cpugdtr.base; |
219 | descriptor_t *gdt_p; |
220 | 220 | ||
221 | gdtr_store(&cpugdtr); |
221 | gdtr_store(&cpugdtr); |
- | 222 | gdt_p = (descriptor_t *) cpugdtr.base; |
|
222 | gdt_setbase(&gdt_p[TLS_DES], tls); |
223 | gdt_setbase(&gdt_p[TLS_DES], tls); |
223 | /* Reload gdt register to update GS in CPU */ |
224 | /* Reload gdt register to update GS in CPU */ |
224 | gdtr_load(&cpugdtr); |
225 | gdtr_load(&cpugdtr); |
225 | } |
226 | } |