PERFORCE change 38849 for review
Peter Wemm
peter at FreeBSD.org
Tue Sep 30 00:08:41 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=38849
Change 38849 by peter at peter_daintree on 2003/09/30 00:07:41
IFC @38846
Affected files ...
.. //depot/projects/hammer/share/man/man9/Makefile#18 integrate
.. //depot/projects/hammer/share/man/man9/vm_map.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_check_protection.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_clean.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_create.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_delete.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_find.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_findspace.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_inherit.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_init.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_insert.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_lock.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_lookup.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_madvise.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_max.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_protect.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_remove.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_simplify_entry.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_stack.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_submap.9#1 branch
.. //depot/projects/hammer/share/man/man9/vm_map_wire.9#1 branch
.. //depot/projects/hammer/sys/amd64/amd64/genassym.c#23 integrate
.. //depot/projects/hammer/sys/amd64/include/clock.h#8 integrate
.. //depot/projects/hammer/sys/amd64/isa/clock.c#11 integrate
.. //depot/projects/hammer/sys/conf/Makefile.amd64#13 integrate
.. //depot/projects/hammer/sys/i386/i386/machdep.c#20 integrate
.. //depot/projects/hammer/sys/net/bridge.c#8 integrate
.. //depot/projects/hammer/sys/netinet6/ip6_forward.c#4 integrate
.. //depot/projects/hammer/sys/netinet6/ip6_output.c#7 integrate
.. //depot/projects/hammer/usr.sbin/Makefile#29 integrate
.. //depot/projects/hammer/usr.sbin/mptable/Makefile#2 integrate
.. //depot/projects/hammer/usr.sbin/mptable/mptable.c#3 integrate
Differences ...
==== //depot/projects/hammer/share/man/man9/Makefile#18 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/man/man9/Makefile,v 1.203 2003/09/26 21:43:25 rwatson Exp $
+# $FreeBSD: src/share/man/man9/Makefile,v 1.205 2003/09/30 00:56:17 bms Exp $
MAN= BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \
BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_CONFIG_INTR.9 BUS_PRINT_CHILD.9 \
@@ -81,6 +81,12 @@
vfsconf.9 \
vget.9 vgone.9 vhold.9 vinvalbuf.9 \
vflush.9 \
+ vm_map.9 \
+ vm_map_check_protection.9 vm_map_clean.9 vm_map_create.9 \
+ vm_map_delete.9 vm_map_find.9 vm_map_findspace.9 vm_map_inherit.9 \
+ vm_map_init.9 vm_map_insert.9 vm_map_lock.9 vm_map_lookup.9 \
+ vm_map_madvise.9 vm_map_max.9 vm_map_protect.9 vm_map_remove.9 \
+ vm_map_simplify_entry.9 vm_map_stack.9 vm_map_submap.9 vm_map_wire.9 \
vm_page_alloc.9 vm_page_bits.9 vm_page_cache.9 \
vm_page_copy.9 vm_page_deactivate.9 vm_page_dontneed.9 \
vm_page_flag.9 vm_page_free.9 vm_page_grab.9 vm_page_hold.9 \
@@ -289,6 +295,18 @@
MLINKS+=vfsconf.9 vfs_unregister.9
MLINKS+=vgone.9 vgonel.9
MLINKS+=vhold.9 vdrop.9
+MLINKS+=vm_map_lock.9 vm_map_unlock.9
+MLINKS+=vm_map_lock.9 vm_map_lock_read.9
+MLINKS+=vm_map_lock.9 vm_map_unlock_read.9
+MLINKS+=vm_map_lock.9 vm_map_trylock.9
+MLINKS+=vm_map_lock.9 vm_map_trylock_read.9
+MLINKS+=vm_map_lock.9 vm_map_lock_upgrade.9
+MLINKS+=vm_map_lock.9 vm_map_lock_downgrade.9
+MLINKS+=vm_map_lookup.9 vm_map_lookup_done.9
+MLINKS+=vm_map_max.9 vm_map_min.9
+MLINKS+=vm_map_max.9 vm_map_pmap.9
+MLINKS+=vm_map_stack.9 vm_map_growstack.9
+MLINKS+=vm_map_wire.9 vm_map_unwire.9
MLINKS+=vm_page_bits.9 vm_page_set_validclean.9
MLINKS+=vm_page_bits.9 vm_page_clear_dirty.9
MLINKS+=vm_page_bits.9 vm_page_set_invalid.9
==== //depot/projects/hammer/sys/amd64/amd64/genassym.c#23 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.148 2003/07/25 21:15:44 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.149 2003/09/30 04:52:24 jeff Exp $");
#include "opt_compat.h"
#include "opt_kstack_pages.h"
@@ -87,7 +87,6 @@
ASSYM(TD_PROC, offsetof(struct thread, td_proc));
ASSYM(TD_INTR_NESTING_LEVEL, offsetof(struct thread, td_intr_nesting_level));
ASSYM(TD_CRITNEST, offsetof(struct thread, td_critnest));
-ASSYM(TD_SWITCHIN, offsetof(struct thread, td_switchin));
ASSYM(TD_MD, offsetof(struct thread, td_md));
ASSYM(P_MD, offsetof(struct proc, p_md));
==== //depot/projects/hammer/sys/amd64/include/clock.h#8 (text+ko) ====
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $FreeBSD: src/sys/amd64/include/clock.h,v 1.46 2003/09/22 23:02:24 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/clock.h,v 1.47 2003/09/30 06:38:11 peter Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -30,9 +30,11 @@
*/
struct clockframe;
+#ifndef BURN_BRIDGES
int acquire_timer0(int rate, void (*function)(struct clockframe *frame));
+int release_timer0(void);
+#endif
int acquire_timer2(int mode);
-int release_timer0(void);
int release_timer2(void);
int rtcin(int val);
int sysbeep(int pitch, int period);
==== //depot/projects/hammer/sys/amd64/isa/clock.c#11 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.202 2003/09/22 23:02:24 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.204 2003/09/30 06:42:47 peter Exp $");
/*
* Routines to handle clock hardware.
@@ -89,11 +89,12 @@
* 32-bit time_t's can't reach leap years before 1904 or after 2036, so we
* can use a simple formula for leap years.
*/
-#define LEAPYEAR(y) ((u_int)(y) % 4 == 0)
+#define LEAPYEAR(y) (((u_int)(y) % 4 == 0) ? 1 : 0)
#define DAYSPERYEAR (31+28+31+30+31+30+31+31+30+31+30+31)
#define TIMER_DIV(x) ((timer_freq + (x) / 2) / (x))
+#ifndef BURN_BRIDGES
/*
* Time in timer cycles that it takes for microtime() to disable interrupts
* and latch the count. microtime() currently uses "cli; outb ..." so it
@@ -109,6 +110,7 @@
* before the next timer interrupt.
*/
#define TIMER0_MAX_FREQ 20000
+#endif
int adjkerntz; /* local offset from GMT in seconds */
int clkintr_pending;
@@ -131,6 +133,7 @@
static u_int32_t i8254_offset;
static int i8254_ticked;
static struct intsrc *i8254_intsrc;
+#ifndef BURN_BRIDGES
/*
* XXX new_function and timer_func should not handle clockframes, but
* timer_func currently needs to hold hardclock to handle the
@@ -139,9 +142,11 @@
*/
static void (*new_function)(struct clockframe *frame);
static u_int new_rate;
+static u_int timer0_prescaler_count;
+static u_char timer0_state;
+#endif
static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
static u_char rtc_statusb = RTCSB_24HR | RTCSB_PINTR;
-static u_int timer0_prescaler_count;
/* Values for timerX_state: */
#define RELEASED 0
@@ -149,7 +154,6 @@
#define ACQUIRED 2
#define ACQUIRE_PENDING 3
-static u_char timer0_state;
static u_char timer2_state;
static void (*timer_func)(struct clockframe *frame) = hardclock;
@@ -161,7 +165,8 @@
0, /* no poll_pps */
~0u, /* counter_mask */
0, /* frequency */
- "i8254" /* name */
+ "i8254", /* name */
+ 0 /* quality */
};
static void
@@ -179,11 +184,12 @@
clkintr_pending = 0;
mtx_unlock_spin(&clock_lock);
}
- timer_func(frame);
+ timer_func(&frame);
#ifdef SMP
if (timer_func == hardclock)
forward_hardclock();
#endif
+#ifndef BURN_BRIDGES
switch (timer0_state) {
case RELEASED:
@@ -228,15 +234,17 @@
timer0_prescaler_count = 0;
timer_func = hardclock;
timer0_state = RELEASED;
- hardclock(frame);
+ hardclock(&frame);
#ifdef SMP
forward_hardclock();
#endif
}
break;
}
+#endif
}
+#ifndef BURN_BRIDGES
/*
* The acquire and release functions must be called at ipl >= splclock().
*/
@@ -272,6 +280,7 @@
old_rate = new_rate = rate;
return (0);
}
+#endif
int
acquire_timer2(int mode)
@@ -293,6 +302,7 @@
return (0);
}
+#ifndef BURN_BRIDGES
int
release_timer0()
{
@@ -312,6 +322,7 @@
}
return (0);
}
+#endif
int
release_timer2()
@@ -357,7 +368,7 @@
if (pscnt == psdiv)
statclock(frame);
#ifdef SMP
- forward_statclock();
+ forward_statclock();
#endif
}
}
@@ -931,8 +942,10 @@
freq = timer_freq;
error = sysctl_handle_int(oidp, &freq, sizeof(freq), req);
if (error == 0 && req->newptr != NULL) {
+#ifndef BURN_BRIDGES
if (timer0_state != RELEASED)
return (EBUSY); /* too much trouble to handle */
+#endif
set_timer_freq(freq, hz);
i8254_timecounter.tc_frequency = freq;
}
==== //depot/projects/hammer/sys/conf/Makefile.amd64#13 (text+ko) ====
@@ -2,7 +2,7 @@
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49
-# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.9 2003/05/30 01:03:43 peter Exp $
+# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.10 2003/09/30 03:49:09 peter Exp $
#
# Makefile for FreeBSD
#
@@ -31,7 +31,7 @@
.endif
.include "$S/conf/kern.pre.mk"
-DDB_ENABLED!= grep DDB opt_ddb.h
+DDB_ENABLED!= grep DDB opt_ddb.h || true
.if ${DDB_ENABLED} != ""
CFLAGS+= -fno-omit-frame-pointer
.endif
==== //depot/projects/hammer/sys/i386/i386/machdep.c#20 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.571 2003/09/10 01:07:03 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.572 2003/09/30 04:51:12 jeff Exp $");
#include "opt_atalk.h"
#include "opt_compat.h"
@@ -1276,7 +1276,7 @@
/* GPROC0_SEL 4 Proc 0 Tss Descriptor */
{
0x0, /* segment base address */
- sizeof(struct i386tss)-1,/* length - all address space */
+ sizeof(struct i386tss)-1,/* length */
SDT_SYS386TSS, /* segment type */
0, /* segment descriptor priority level */
1, /* segment descriptor present */
==== //depot/projects/hammer/sys/net/bridge.c#8 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/net/bridge.c,v 1.70 2003/09/23 17:54:03 sam Exp $
+ * $FreeBSD: src/sys/net/bridge.c,v 1.71 2003/09/30 04:46:08 sam Exp $
*/
/*
@@ -1020,13 +1020,11 @@
ip->ip_off = ntohs(ip->ip_off);
if (pfil_run_hooks(&inet_pfil_hook, &m0, src, PFIL_IN) != 0) {
- EH_RESTORE(m0); /* restore Ethernet header */
- return m0;
- }
- if (m0 == NULL) {
- bdg_dropped++;
+ /* NB: hook should consume packet */
return NULL;
}
+ if (m0 == NULL) /* consumed by filter */
+ return m0;
/*
* If we get here, the firewall has passed the pkt, but the mbuf
* pointer might have changed. Restore ip and the fields ntohs()'d.
==== //depot/projects/hammer/sys/netinet6/ip6_forward.c#4 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet6/ip6_forward.c,v 1.17 2003/09/23 17:54:03 sam Exp $ */
+/* $FreeBSD: src/sys/netinet6/ip6_forward.c,v 1.18 2003/09/30 04:46:08 sam Exp $ */
/* $KAME: ip6_forward.c,v 1.69 2001/05/17 03:48:30 itojun Exp $ */
/*
@@ -522,10 +522,9 @@
/*
* Run through list of hooks for output packets.
*/
- if (pfil_run_hooks(&inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT) != 0) {
- error = EHOSTUNREACH;
- goto freecopy;
- }
+ error = pfil_run_hooks(&inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT);
+ if (error != 0)
+ goto senderr;
if (m == NULL)
goto freecopy;
ip6 = mtod(m, struct ip6_hdr *);
@@ -545,6 +544,9 @@
goto freecopy;
}
}
+#ifdef PFIL_HOOKS
+senderr:
+#endif
if (mcopy == NULL)
return;
switch (error) {
==== //depot/projects/hammer/sys/netinet6/ip6_output.c#7 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.50 2003/09/23 17:54:03 sam Exp $ */
+/* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.51 2003/09/30 04:46:08 sam Exp $ */
/* $KAME: ip6_output.c,v 1.279 2002/01/26 06:12:30 jinmei Exp $ */
/*
@@ -926,11 +926,8 @@
/*
* Run through list of hooks for output packets.
*/
- if (pfil_run_hooks(&inet6_pfil_hook, &m, ifp, PFIL_OUT) != 0) {
- error = EHOSTUNREACH;
- goto done;
- }
- if (m == NULL)
+ error = pfil_run_hooks(&inet6_pfil_hook, &m, ifp, PFIL_OUT);
+ if (error != 0 || m == NULL)
goto done;
ip6 = mtod(m, struct ip6_hdr *);
#endif /* PFIL_HOOKS */
==== //depot/projects/hammer/usr.sbin/Makefile#29 (text+ko) ====
@@ -1,5 +1,5 @@
# From: @(#)Makefile 5.20 (Berkeley) 6/12/93
-# $FreeBSD: src/usr.sbin/Makefile,v 1.271 2003/09/16 21:25:42 marcel Exp $
+# $FreeBSD: src/usr.sbin/Makefile,v 1.273 2003/09/30 04:19:01 peter Exp $
.if ${MACHINE_ARCH} != "powerpc"
_sysinstall=sysinstall
@@ -221,11 +221,13 @@
# pnpinfo: crashes (not really useful anyway)
.if ${MACHINE_ARCH} == "amd64"
SUBDIR+=acpi \
+ asf \
boot0cfg \
btxld \
lptcontrol \
mount_nwfs \
mount_smbfs \
+ mptable \
sicontrol \
spkrtest \
zzz
==== //depot/projects/hammer/usr.sbin/mptable/Makefile#2 (text+ko) ====
@@ -1,5 +1,6 @@
-# $FreeBSD: src/usr.sbin/mptable/Makefile,v 1.6 2001/03/26 14:40:51 ru Exp $
+# $FreeBSD: src/usr.sbin/mptable/Makefile,v 1.7 2003/09/30 04:09:21 peter Exp $
PROG= mptable
+WARNS?= 6
.include <bsd.prog.mk>
==== //depot/projects/hammer/usr.sbin/mptable/mptable.c#3 (text+ko) ====
@@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
- "$FreeBSD: src/usr.sbin/mptable/mptable.c,v 1.17 2003/06/07 18:33:18 imp Exp $";
+ "$FreeBSD: src/usr.sbin/mptable/mptable.c,v 1.18 2003/09/30 04:09:21 peter Exp $";
#endif /* not lint */
#define VMAJOR 2
@@ -123,7 +123,7 @@
{ UNKNOWN_BUSTYPE, "---" }
};
-char* whereStrings[] = {
+const char* whereStrings[] = {
"Extended BIOS Data Area",
"BIOS top of memory",
"Default top of memory",
@@ -158,7 +158,7 @@
/* MP Floating Pointer Structure */
typedef struct MPFPS {
char signature[ 4 ];
- void* pap;
+ u_int32_t pap;
u_char length;
u_char spec_rev;
u_char checksum;
@@ -177,10 +177,10 @@
u_char checksum;
u_char oem_id[ 8 ];
u_char product_id[ 12 ];
- void* oem_table_pointer;
+ u_int32_t oem_table_pointer;
u_short oem_table_size;
u_short entry_count;
- void* apic_address;
+ u_int32_t apic_address;
u_short extended_table_length;
u_char extended_table_checksum;
u_char reserved;
@@ -192,10 +192,10 @@
u_char apicID;
u_char apicVersion;
u_char cpuFlags;
- u_long cpuSignature;
- u_long featureFlags;
- u_long reserved1;
- u_long reserved2;
+ u_int32_t cpuSignature;
+ u_int32_t featureFlags;
+ u_int32_t reserved1;
+ u_int32_t reserved2;
} ProcEntry;
typedef struct BUSENTRY {
@@ -209,7 +209,7 @@
u_char apicID;
u_char apicVersion;
u_char apicFlags;
- void* apicAddress;
+ u_int32_t apicAddress;
} IOApicEntry;
typedef struct INTENTRY {
@@ -234,7 +234,7 @@
u_char addressType;
u_int64_t addressBase;
u_int64_t addressLength;
-} SasEntry;
+} __attribute__((__packed__)) SasEntry;
typedef struct BHDENTRY {
@@ -257,15 +257,15 @@
-static void apic_probe( vm_offset_t* paddr, int* where );
+static void apic_probe( u_int32_t* paddr, int* where );
static void MPConfigDefault( int featureByte );
-static void MPFloatingPointer( vm_offset_t paddr, int where, mpfps_t* mpfps );
-static void MPConfigTableHeader( void* pap );
+static void MPFloatingPointer( u_int32_t paddr, int where, mpfps_t* mpfps );
+static void MPConfigTableHeader( u_int32_t pap );
static int readType( void );
-static void seekEntry( vm_offset_t addr );
+static void seekEntry( u_int32_t addr );
static void readEntry( void* entry, int size );
static void processorEntry( void );
@@ -308,7 +308,7 @@
int
main( int argc, char *argv[] )
{
- vm_offset_t paddr;
+ u_int32_t paddr;
int where;
mpfps_t mpfps;
int defaultConfig;
@@ -393,7 +393,7 @@
*/
#define NEXT(X) ((X) += 4)
static void
-apic_probe( vm_offset_t* paddr, int* where )
+apic_probe( u_int32_t* paddr, int* where )
{
/*
* c rewrite of apic_probe() by Jack F. Vogel
@@ -401,7 +401,7 @@
int x;
u_short segment;
- vm_offset_t target;
+ u_int32_t target;
u_int buffer[ BIOS_SIZE / sizeof( int ) ];
if ( verbose )
@@ -410,16 +410,16 @@
/* search Extended Bios Data Area, if present */
if ( verbose )
printf( " looking for EBDA pointer @ 0x%04x, ", EBDA_POINTER );
- seekEntry( (vm_offset_t)EBDA_POINTER );
+ seekEntry( (u_int32_t)EBDA_POINTER );
readEntry( &segment, 2 );
if ( segment ) { /* search EBDA */
- target = (vm_offset_t)segment << 4;
+ target = (u_int32_t)segment << 4;
if ( verbose )
printf( "found, searching EBDA @ 0x%08x\n", target );
seekEntry( target );
readEntry( buffer, ONE_KBYTE );
- for ( x = 0; x < ONE_KBYTE / sizeof ( unsigned int ); NEXT(x) ) {
+ for ( x = 0; x < ONE_KBYTE / (int)sizeof ( unsigned int ); NEXT(x) ) {
if ( buffer[ x ] == MP_SIG ) {
*where = 1;
*paddr = (x * sizeof( unsigned int )) + target;
@@ -433,7 +433,7 @@
}
/* read CMOS for real top of mem */
- seekEntry( (vm_offset_t)TOPOFMEM_POINTER );
+ seekEntry( (u_int32_t)TOPOFMEM_POINTER );
readEntry( &segment, 2 );
--segment; /* less ONE_KBYTE */
target = segment * 1024;
@@ -443,7 +443,7 @@
seekEntry( target );
readEntry( buffer, ONE_KBYTE );
- for ( x = 0; x < ONE_KBYTE / sizeof ( unsigned int ); NEXT(x) ) {
+ for ( x = 0; x < ONE_KBYTE / (int)sizeof ( unsigned int ); NEXT(x) ) {
if ( buffer[ x ] == MP_SIG ) {
*where = 2;
*paddr = (x * sizeof( unsigned int )) + target;
@@ -460,7 +460,7 @@
seekEntry( target );
readEntry( buffer, ONE_KBYTE );
- for ( x = 0; x < ONE_KBYTE / sizeof ( unsigned int ); NEXT(x) ) {
+ for ( x = 0; x < ONE_KBYTE / (int)sizeof ( unsigned int ); NEXT(x) ) {
if ( buffer[ x ] == MP_SIG ) {
*where = 3;
*paddr = (x * sizeof( unsigned int )) + target;
@@ -475,7 +475,7 @@
seekEntry( BIOS_BASE );
readEntry( buffer, BIOS_SIZE );
- for ( x = 0; x < BIOS_SIZE / sizeof( unsigned int ); NEXT(x) ) {
+ for ( x = 0; x < BIOS_SIZE / (int)sizeof( unsigned int ); NEXT(x) ) {
if ( buffer[ x ] == MP_SIG ) {
*where = 4;
*paddr = (x * sizeof( unsigned int )) + BIOS_BASE;
@@ -489,7 +489,7 @@
seekEntry( BIOS_BASE2 );
readEntry( buffer, BIOS_SIZE );
- for ( x = 0; x < BIOS_SIZE / sizeof( unsigned int ); NEXT(x) ) {
+ for ( x = 0; x < BIOS_SIZE / (int)sizeof( unsigned int ); NEXT(x) ) {
if ( buffer[ x ] == MP_SIG ) {
*where = 5;
*paddr = (x * sizeof( unsigned int )) + BIOS_BASE2;
@@ -505,7 +505,7 @@
seekEntry( target );
readEntry( buffer, GROPE_SIZE );
- for ( x = 0; x < GROPE_SIZE / sizeof( unsigned int ); NEXT(x) ) {
+ for ( x = 0; x < GROPE_SIZE / (int)sizeof( unsigned int ); NEXT(x) ) {
if ( buffer[ x ] == MP_SIG ) {
*where = 6;
*paddr = (x * sizeof( unsigned int )) + GROPE_AREA1;
@@ -519,7 +519,7 @@
seekEntry( target );
readEntry( buffer, GROPE_SIZE );
- for ( x = 0; x < GROPE_SIZE / sizeof( unsigned int ); NEXT(x) ) {
+ for ( x = 0; x < GROPE_SIZE / (int)sizeof( unsigned int ); NEXT(x) ) {
if ( buffer[ x ] == MP_SIG ) {
*where = 7;
*paddr = (x * sizeof( unsigned int )) + GROPE_AREA2;
@@ -529,7 +529,7 @@
}
*where = 0;
- *paddr = (vm_offset_t)0;
+ *paddr = (u_int32_t)0;
}
@@ -537,7 +537,7 @@
*
*/
static void
-MPFloatingPointer( vm_offset_t paddr, int where, mpfps_t* mpfps )
+MPFloatingPointer( u_int32_t paddr, int where, mpfps_t* mpfps )
{
/* read in mpfps structure*/
@@ -663,9 +663,9 @@
*
*/
static void
-MPConfigTableHeader( void* pap )
+MPConfigTableHeader( u_int32_t pap )
{
- vm_offset_t paddr;
+ u_int32_t paddr;
mpcth_t cth;
int x;
int totalSize;
@@ -679,7 +679,7 @@
}
/* convert physical address to virtual address */
- paddr = (vm_offset_t)pap;
+ paddr = pap;
/* read in cth structure */
seekEntry( paddr );
@@ -817,7 +817,7 @@
#if defined( OEM_PROCESSING_READY )
# error your on your own here!
/* convert OEM table pointer to virtual address */
- poemtp = (vm_offset_t)cth.oem_table_pointer;
+ poemtp = (u_int32_t)cth.oem_table_pointer;
/* read in oem table structure */
if ( (oemdata = (void*)malloc( cth.oem_table_size )) == NULL )
@@ -873,7 +873,7 @@
*
*/
static void
-seekEntry( vm_offset_t addr )
+seekEntry( u_int32_t addr )
{
if ( lseek( pfd, (off_t)addr, SEEK_SET ) < 0 )
err( 1, "%s seek", _PATH_MEM );
@@ -982,14 +982,14 @@
}
-char* intTypes[] = {
+const char* intTypes[] = {
"INT", "NMI", "SMI", "ExtINT"
};
-char* polarityMode[] = {
+const char* polarityMode[] = {
"conforms", "active-hi", "reserved", "active-lo"
};
-char* triggerMode[] = {
+const char* triggerMode[] = {
"conforms", "edge", "reserved", "level"
};
@@ -1048,8 +1048,8 @@
break;
}
- printf( " address base: 0x%qx\n", entry.addressBase );
- printf( " address range: 0x%qx\n", entry.addressLength );
+ printf( " address base: 0x%llx\n", (long long)entry.addressBase );
+ printf( " address range: 0x%llx\n", (long long)entry.addressLength );
}
More information about the p4-projects
mailing list