Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2003 17:07:54 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 38932 for review
Message-ID:  <200310010007.h9107sqR040210@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38932

Change 38932 by peter@peter_hammer on 2003/09/30 17:07:34

	add lapic_disable() rather than having mpboot.s do it in asm.

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#10 edit
.. //depot/projects/hammer/sys/amd64/include/apicvar.h#5 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#10 (text+ko) ====

@@ -280,6 +280,24 @@
 	intr_restore(eflags);
 }
 
+void
+lapic_disable(void)
+{
+	struct lapic *la;
+	u_int32_t value;
+	register_t eflags;
+
+	la = &lapics[lapic_id()];
+	KASSERT(la->la_present, ("missing APIC structure"));
+	eflags = intr_disable();
+
+	/* Disable local APIC to be safe during boot */
+	value = lapic->svr;
+	value &= ~APIC_SVR_SWEN;
+	lapic->svr = value;
+	intr_restore(eflags);
+}
+
 int
 lapic_id(void)
 {

==== //depot/projects/hammer/sys/amd64/include/apicvar.h#5 (text+ko) ====

@@ -159,6 +159,7 @@
 int	lapic_set_lvt_polarity(u_int apic_id, u_int lvt, u_char activehi);
 int	lapic_set_lvt_triggermode(u_int apic_id, u_int lvt, u_char edgetrigger);
 void	lapic_setup(void);
+void	lapic_disable(void);
 
 #endif /* !LOCORE */
 #endif /* _MACHINE_APICVAR_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310010007.h9107sqR040210>