PERFORCE change 42383 for review

Peter Wemm peter at FreeBSD.org
Fri Nov 14 13:07:09 PST 2003


http://perforce.freebsd.org/chv.cgi?CH=42383

Change 42383 by peter at peter_daintree on 2003/11/14 13:06:27

	make this actually work, for what its worth.  It seems that mptables are even
	more likely to be broken here.

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/mptable.c#12 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/mptable.c#12 (text+ko) ====

@@ -27,7 +27,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/sys/i386/i386/mptable.c,v 1.225 2003/11/11 21:19:43 jhb Exp $");
 
-#include "opt_mptable_force_htt.h"
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
@@ -221,18 +220,19 @@
 mptable_probe(void)
 {
 	int     x;
-	u_long  segment;
+	u_int32_t segment;
 	u_int32_t target;
 
 	/* see if EBDA exists */
-	if ((segment = (u_long) * (u_short *) (KERNBASE + 0x40e)) != 0) {
+	segment = (u_int32_t) *(u_short *)(KERNBASE + 0x40e);
+	if (segment != 0) {
 		/* search first 1K of EBDA */
 		target = (u_int32_t) (segment << 4);
 		if ((x = search_for_sig(target, 1024 / 4)) >= 0)
 			goto found;
 	} else {
 		/* last 1K of base memory, effective 'top of base' passed in */
-		target = (u_int32_t) (basemem - 0x400);
+		target = (u_int32_t) ((basemem * 1024) - 0x400);
 		if ((x = search_for_sig(target, 1024 / 4)) >= 0)
 			goto found;
 	}


More information about the p4-projects mailing list