Changeset 168 for trunk/hal/x86_64/core/hal_special.c
- Timestamp:
- Jul 10, 2017, 10:33:15 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_special.c
r167 r168 43 43 (*(tls_t * const *)offsetof(tls_t, tls_self))); 44 44 return cputls; 45 }46 47 static void hal_tls_load_cpu(tls_t *cputls)48 {49 wrmsr(MSR_FSBASE, 0);50 wrmsr(MSR_GSBASE, (uint64_t)cputls);51 wrmsr(MSR_KERNELGSBASE, 0);52 }53 54 void hal_tls_init_cpu0()55 {56 tls_t *cputls = &cpu0;57 58 memset(cputls, 0, sizeof(tls_t));59 60 cputls->tls_self = cputls;61 cputls->tls_gid = hal_lapic_gid();62 cputls->tls_lid = 0; /* XXX */63 64 hal_tls_load_cpu(cputls);65 45 } 66 46
Note: See TracChangeset
for help on using the changeset viewer.