diff options
author | wpaul <wpaul@FreeBSD.org> | 2005-05-20 04:01:36 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2005-05-20 04:01:36 +0000 |
commit | df85175aeb48937a7930075f432bb70d569ff2c1 (patch) | |
tree | 5068bb2860e41432793e8c2d83353f26b10c1670 /sys/compat | |
parent | 29dcab8107f3a57a4fa23bde0c84d48e6b124c06 (diff) | |
download | FreeBSD-src-df85175aeb48937a7930075f432bb70d569ff2c1.zip FreeBSD-src-df85175aeb48937a7930075f432bb70d569ff2c1.tar.gz |
Missed kern_windrv.c in the last checkin.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/ndis/kern_windrv.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/compat/ndis/kern_windrv.c b/sys/compat/ndis/kern_windrv.c index 06a48e5..90c977b 100644 --- a/sys/compat/ndis/kern_windrv.c +++ b/sys/compat/ndis/kern_windrv.c @@ -664,6 +664,20 @@ ctxsw_utow(void) struct tid *t; t = &my_tids[curthread->td_oncpu]; + + /* + * Ugly hack. During system bootstrap (cold == 1), only CPU 0 + * is running. So if we were loaded at bootstrap, only CPU 0 + * will have our special GDT entry. This is a problem for SMP + * systems, so to deal with this, we check here to make sure + * the TID for this processor has been initialized, and if it + * hasn't, we need to do it right now or else things will + * explode. + */ + + if (t->tid_self != t) + x86_newldt(NULL); + t->tid_oldfs = x86_getfs(); t->tid_cpu = curthread->td_oncpu; |