diff options
author | Hans Rosenfeld <hans.rosenfeld@joyent.com> | 2017-04-20 17:44:15 +0200 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@joyent.com> | 2017-04-28 16:52:27 +0000 |
commit | 6868c57d2033d43b327fe6549e9f1f552eae1e86 (patch) | |
tree | f515d2412c91467bae23c699582ceb82e1e00f58 | |
parent | 881ad294e65e1bdc2db9586d72cbcb9c8d801dc9 (diff) | |
download | illumos-joyent-6868c57d2033d43b327fe6549e9f1f552eae1e86.tar.gz |
OS-6075 kernel panic in apix:apic_timer_init
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/uts/i86pc/io/apix/apix.c | 9 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/pcplusmp/apic.c | 14 |
2 files changed, 17 insertions, 6 deletions
diff --git a/usr/src/uts/i86pc/io/apix/apix.c b/usr/src/uts/i86pc/io/apix/apix.c index 87043cb8d8..9bacbd7c5e 100644 --- a/usr/src/uts/i86pc/io/apix/apix.c +++ b/usr/src/uts/i86pc/io/apix/apix.c @@ -27,7 +27,7 @@ * All rights reserved. */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2017, Joyent, Inc. All rights reserved. */ /* @@ -272,8 +272,11 @@ apix_probe() /* check if x2APIC mode is supported */ if ((apix_supported_hw & APIX_SUPPORT_X2APIC) == APIX_SUPPORT_X2APIC) { - if (!((apic_local_mode() == LOCAL_X2APIC) || - apic_detect_x2apic())) { + if (apic_local_mode() == LOCAL_X2APIC) { + /* x2APIC mode activated by BIOS, switch ops */ + apic_mode = LOCAL_X2APIC; + apic_change_ops(); + } else if (!apic_detect_x2apic()) { /* x2APIC mode is not supported in the hw */ apix_enable = 0; } diff --git a/usr/src/uts/i86pc/io/pcplusmp/apic.c b/usr/src/uts/i86pc/io/pcplusmp/apic.c index d65e4db941..cd06f76967 100644 --- a/usr/src/uts/i86pc/io/pcplusmp/apic.c +++ b/usr/src/uts/i86pc/io/pcplusmp/apic.c @@ -27,7 +27,7 @@ * All rights reserved. */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2017, Joyent, Inc. All rights reserved. */ /* @@ -248,8 +248,16 @@ apic_probe(void) /* check if apix is initialized */ if (apix_enable && apix_loaded()) return (PSM_FAILURE); - else - apix_enable = 0; /* continue using pcplusmp PSM */ + + /* + * Check whether x2APIC mode was activated by BIOS. We don't support + * that in pcplusmp as apix normally handles that. + */ + if (apic_local_mode() == LOCAL_X2APIC) + return (PSM_FAILURE); + + /* continue using pcplusmp PSM */ + apix_enable = 0; return (apic_probe_common(apic_psm_info.p_mach_idstring)); } |