PERFORCE change 160631 for review

John Baldwin jhb at FreeBSD.org
Tue Apr 14 12:06:29 PDT 2009


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

Change 160631 by jhb at jhb_jhbbsd on 2009/04/14 19:06:19

	IFC @160628

Affected files ...

.. //depot/projects/smpng/sys/amd64/amd64/busdma_machdep.c#31 integrate
.. //depot/projects/smpng/sys/amd64/amd64/machdep.c#78 integrate
.. //depot/projects/smpng/sys/amd64/conf/GENERIC#75 integrate
.. //depot/projects/smpng/sys/amd64/include/cpufunc.h#16 integrate
.. //depot/projects/smpng/sys/amd64/include/endian.h#5 integrate
.. //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#29 integrate
.. //depot/projects/smpng/sys/arm/arm/trap.c#30 integrate
.. //depot/projects/smpng/sys/boot/i386/libi386/Makefile#19 integrate
.. //depot/projects/smpng/sys/boot/i386/libi386/biosdisk.c#20 integrate
.. //depot/projects/smpng/sys/boot/i386/libi386/smbios.c#8 integrate
.. //depot/projects/smpng/sys/boot/sparc64/loader/main.c#28 integrate
.. //depot/projects/smpng/sys/cam/cam_xpt.c#57 integrate
.. //depot/projects/smpng/sys/cddl/compat/opensolaris/sys/vnode.h#4 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#5 integrate
.. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#8 integrate
.. //depot/projects/smpng/sys/conf/NOTES#165 integrate
.. //depot/projects/smpng/sys/conf/files#236 integrate
.. //depot/projects/smpng/sys/contrib/pf/net/pf.c#33 integrate
.. //depot/projects/smpng/sys/dev/agp/agp.c#8 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-queue.c#48 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ah.c#8 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ah_internal.h#7 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c#2 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c#2 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c#3 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_rate/sample/sample.c#15 integrate
.. //depot/projects/smpng/sys/dev/ath/if_ath.c#74 integrate
.. //depot/projects/smpng/sys/dev/ath/if_athvar.h#46 integrate
.. //depot/projects/smpng/sys/dev/cxgb/cxgb_sge.c#16 integrate
.. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#15 integrate
.. //depot/projects/smpng/sys/dev/drm/r300_cmdbuf.c#7 integrate
.. //depot/projects/smpng/sys/dev/drm/r300_reg.h#5 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_cp.c#23 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_drv.h#20 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_80003es2lan.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_82540.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_82541.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_82571.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_82575.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_82575.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_api.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_api.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_defines.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_hw.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_ich8lan.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_ich8lan.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_mac.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_mac.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_nvm.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_nvm.h#2 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_phy.c#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_phy.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/e1000_regs.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/if_em.c#5 integrate
.. //depot/projects/smpng/sys/dev/e1000/if_em.h#3 integrate
.. //depot/projects/smpng/sys/dev/e1000/if_igb.c#6 integrate
.. //depot/projects/smpng/sys/dev/e1000/if_igb.h#3 integrate
.. //depot/projects/smpng/sys/dev/ed/if_ed_pccard.c#47 integrate
.. //depot/projects/smpng/sys/dev/ep/if_ep.c#29 integrate
.. //depot/projects/smpng/sys/dev/ep/if_ep_pccard.c#23 integrate
.. //depot/projects/smpng/sys/dev/ep/if_epreg.h#8 integrate
.. //depot/projects/smpng/sys/dev/ep/if_epvar.h#13 integrate
.. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#89 integrate
.. //depot/projects/smpng/sys/dev/hptmv/entry.c#17 integrate
.. //depot/projects/smpng/sys/dev/if_ndis/if_ndis.c#56 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/LICENSE#3 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/README#2 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe.c#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe.h#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_82598.c#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_82599.c#1 branch
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_api.c#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_api.h#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_common.c#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_common.h#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_osdep.h#4 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_phy.c#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_phy.h#5 integrate
.. //depot/projects/smpng/sys/dev/ixgbe/ixgbe_type.h#5 integrate
.. //depot/projects/smpng/sys/dev/joy/joy.c#12 integrate
.. //depot/projects/smpng/sys/dev/kbd/kbdreg.h#7 integrate
.. //depot/projects/smpng/sys/dev/kbdmux/kbdmux.c#13 integrate
.. //depot/projects/smpng/sys/dev/pccard/pccarddevs#66 integrate
.. //depot/projects/smpng/sys/dev/pccbb/pccbb_pci.c#22 integrate
.. //depot/projects/smpng/sys/dev/pci/pci.c#107 integrate
.. //depot/projects/smpng/sys/dev/powermac_nvram/powermac_nvram.c#6 integrate
.. //depot/projects/smpng/sys/dev/syscons/syscons.c#70 integrate
.. //depot/projects/smpng/sys/dev/tdfx/tdfx_pci.c#23 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_freebsd.c#12 integrate
.. //depot/projects/smpng/sys/dev/twe/twe_freebsd.c#27 integrate
.. //depot/projects/smpng/sys/dev/uart/uart_cpu_powerpc.c#7 integrate
.. //depot/projects/smpng/sys/dev/uart/uart_dev_ns8250.c#20 integrate
.. //depot/projects/smpng/sys/dev/usb/controller/usb_controller.c#5 integrate
.. //depot/projects/smpng/sys/fs/devfs/devfs_vnops.c#78 integrate
.. //depot/projects/smpng/sys/fs/fifofs/fifo_vnops.c#50 integrate
.. //depot/projects/smpng/sys/fs/pseudofs/pseudofs_vnops.c#56 integrate
.. //depot/projects/smpng/sys/fs/unionfs/union_subr.c#37 integrate
.. //depot/projects/smpng/sys/fs/unionfs/union_vnops.c#43 integrate
.. //depot/projects/smpng/sys/geom/geom.h#54 integrate
.. //depot/projects/smpng/sys/geom/geom_disk.c#56 integrate
.. //depot/projects/smpng/sys/geom/geom_disk.h#9 integrate
.. //depot/projects/smpng/sys/geom/geom_subr.c#58 integrate
.. //depot/projects/smpng/sys/geom/journal/g_journal.c#12 integrate
.. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#39 integrate
.. //depot/projects/smpng/sys/geom/part/g_part.c#19 integrate
.. //depot/projects/smpng/sys/geom/part/g_part_ebr.c#7 integrate
.. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#40 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_share.c#8 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_share.h#4 integrate
.. //depot/projects/smpng/sys/i386/i386/busdma_machdep.c#50 integrate
.. //depot/projects/smpng/sys/i386/i386/machdep.c#139 integrate
.. //depot/projects/smpng/sys/i386/include/cpufunc.h#39 integrate
.. //depot/projects/smpng/sys/i386/include/endian.h#17 integrate
.. //depot/projects/smpng/sys/ia64/ia64/busdma_machdep.c#31 integrate
.. //depot/projects/smpng/sys/kern/kern_acct.c#54 integrate
.. //depot/projects/smpng/sys/kern/kern_alq.c#19 integrate
.. //depot/projects/smpng/sys/kern/kern_ktrace.c#68 integrate
.. //depot/projects/smpng/sys/kern/kern_sig.c#147 integrate
.. //depot/projects/smpng/sys/kern/kern_tc.c#48 integrate
.. //depot/projects/smpng/sys/kern/kern_time.c#57 integrate
.. //depot/projects/smpng/sys/kern/kern_umtx.c#36 integrate
.. //depot/projects/smpng/sys/kern/kern_vimage.c#2 integrate
.. //depot/projects/smpng/sys/kern/tty.c#88 integrate
.. //depot/projects/smpng/sys/kern/uipc_domain.c#23 integrate
.. //depot/projects/smpng/sys/kern/uipc_syscalls.c#113 integrate
.. //depot/projects/smpng/sys/kern/uipc_usrreq.c#87 integrate
.. //depot/projects/smpng/sys/kern/vfs_acl.c#6 integrate
.. //depot/projects/smpng/sys/kern/vfs_cache.c#54 integrate
.. //depot/projects/smpng/sys/kern/vfs_default.c#59 integrate
.. //depot/projects/smpng/sys/kern/vfs_extattr.c#7 integrate
.. //depot/projects/smpng/sys/kern/vfs_mount.c#91 integrate
.. //depot/projects/smpng/sys/kern/vfs_syscalls.c#144 integrate
.. //depot/projects/smpng/sys/kern/vfs_vnops.c#93 integrate
.. //depot/projects/smpng/sys/kern/vnode_if.src#41 integrate
.. //depot/projects/smpng/sys/modules/Makefile#159 integrate
.. //depot/projects/smpng/sys/modules/ixgbe/Makefile#4 integrate
.. //depot/projects/smpng/sys/modules/nfssvc/Makefile#1 branch
.. //depot/projects/smpng/sys/net/if.c#116 integrate
.. //depot/projects/smpng/sys/net/if_bridge.c#56 integrate
.. //depot/projects/smpng/sys/net/if_gif.c#49 integrate
.. //depot/projects/smpng/sys/net/if_loop.c#54 integrate
.. //depot/projects/smpng/sys/net/if_spppsubr.c#39 integrate
.. //depot/projects/smpng/sys/net/if_var.h#60 integrate
.. //depot/projects/smpng/sys/net/route.c#45 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_node.c#45 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_output.c#41 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_tdma.c#10 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_var.h#37 integrate
.. //depot/projects/smpng/sys/netinet/icmp6.h#14 integrate
.. //depot/projects/smpng/sys/netinet/icmp_var.h#11 integrate
.. //depot/projects/smpng/sys/netinet/if_ether.c#68 integrate
.. //depot/projects/smpng/sys/netinet/igmp.c#30 integrate
.. //depot/projects/smpng/sys/netinet/igmp_var.h#8 integrate
.. //depot/projects/smpng/sys/netinet/in_gif.c#27 integrate
.. //depot/projects/smpng/sys/netinet/in_pcb.h#61 integrate
.. //depot/projects/smpng/sys/netinet/ip_carp.c#32 integrate
.. //depot/projects/smpng/sys/netinet/ip_carp.h#4 integrate
.. //depot/projects/smpng/sys/netinet/ip_divert.c#63 integrate
.. //depot/projects/smpng/sys/netinet/ip_dummynet.c#54 integrate
.. //depot/projects/smpng/sys/netinet/ip_dummynet.h#24 integrate
.. //depot/projects/smpng/sys/netinet/ip_fastfwd.c#35 integrate
.. //depot/projects/smpng/sys/netinet/ip_icmp.c#48 integrate
.. //depot/projects/smpng/sys/netinet/ip_input.c#97 integrate
.. //depot/projects/smpng/sys/netinet/ip_ipsec.c#13 integrate
.. //depot/projects/smpng/sys/netinet/ip_mroute.c#65 integrate
.. //depot/projects/smpng/sys/netinet/ip_mroute.h#14 integrate
.. //depot/projects/smpng/sys/netinet/ip_options.c#13 integrate
.. //depot/projects/smpng/sys/netinet/ip_output.c#105 integrate
.. //depot/projects/smpng/sys/netinet/ip_var.h#40 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias.c#9 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_cuseeme.c#3 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_dummy.c#2 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_ftp.c#8 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_irc.c#9 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_mod.c#3 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_mod.h#2 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_nbt.c#4 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_pptp.c#3 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_skinny.c#5 integrate
.. //depot/projects/smpng/sys/netinet/libalias/alias_smedia.c#6 integrate
.. //depot/projects/smpng/sys/netinet/pim_var.h#4 integrate
.. //depot/projects/smpng/sys/netinet/raw_ip.c#79 integrate
.. //depot/projects/smpng/sys/netinet/sctp_indata.c#24 integrate
.. //depot/projects/smpng/sys/netinet/sctp_sysctl.c#13 integrate
.. //depot/projects/smpng/sys/netinet/sctp_uio.h#21 integrate
.. //depot/projects/smpng/sys/netinet/tcp_hostcache.c#17 integrate
.. //depot/projects/smpng/sys/netinet/tcp_input.c#124 integrate
.. //depot/projects/smpng/sys/netinet/tcp_output.c#60 integrate
.. //depot/projects/smpng/sys/netinet/tcp_reass.c#8 integrate
.. //depot/projects/smpng/sys/netinet/tcp_sack.c#30 integrate
.. //depot/projects/smpng/sys/netinet/tcp_subr.c#111 integrate
.. //depot/projects/smpng/sys/netinet/tcp_syncache.c#70 integrate
.. //depot/projects/smpng/sys/netinet/tcp_timer.c#46 integrate
.. //depot/projects/smpng/sys/netinet/tcp_timewait.c#12 integrate
.. //depot/projects/smpng/sys/netinet/tcp_usrreq.c#77 integrate
.. //depot/projects/smpng/sys/netinet/tcp_var.h#66 integrate
.. //depot/projects/smpng/sys/netinet/udp_usrreq.c#90 integrate
.. //depot/projects/smpng/sys/netinet/udp_var.h#12 integrate
.. //depot/projects/smpng/sys/netinet6/icmp6.c#51 integrate
.. //depot/projects/smpng/sys/netinet6/ip6_input.c#60 integrate
.. //depot/projects/smpng/sys/netinet6/mld6.c#28 integrate
.. //depot/projects/smpng/sys/netinet6/nd6.c#51 integrate
.. //depot/projects/smpng/sys/netinet6/nd6_nbr.c#34 integrate
.. //depot/projects/smpng/sys/netinet6/nd6_rtr.c#29 integrate
.. //depot/projects/smpng/sys/netinet6/raw_ip6.c#59 integrate
.. //depot/projects/smpng/sys/netinet6/udp6_usrreq.c#55 integrate
.. //depot/projects/smpng/sys/netipsec/ipsec.c#33 integrate
.. //depot/projects/smpng/sys/netipsec/xform_ah.c#17 integrate
.. //depot/projects/smpng/sys/netipsec/xform_esp.c#18 integrate
.. //depot/projects/smpng/sys/netipsec/xform_ipcomp.c#15 integrate
.. //depot/projects/smpng/sys/netipsec/xform_ipip.c#21 integrate
.. //depot/projects/smpng/sys/nfs/nfs_nfssvc.c#1 branch
.. //depot/projects/smpng/sys/nfs/nfssvc.h#1 branch
.. //depot/projects/smpng/sys/nfs4client/nfs4_vnops.c#32 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_socket.c#59 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_vnops.c#86 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs.h#25 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs_srvkrpc.c#4 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs_srvsubs.c#48 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs_syscalls.c#42 integrate
.. //depot/projects/smpng/sys/pc98/pc98/machdep.c#31 integrate
.. //depot/projects/smpng/sys/powerpc/aim/machdep.c#11 integrate
.. //depot/projects/smpng/sys/powerpc/aim/trap_subr.S#8 integrate
.. //depot/projects/smpng/sys/powerpc/include/hid.h#6 integrate
.. //depot/projects/smpng/sys/powerpc/include/spr.h#13 integrate
.. //depot/projects/smpng/sys/sys/elf_common.h#17 integrate
.. //depot/projects/smpng/sys/sys/kernel.h#43 integrate
.. //depot/projects/smpng/sys/sys/mbuf.h#81 integrate
.. //depot/projects/smpng/sys/sys/param.h#142 integrate
.. //depot/projects/smpng/sys/sys/systm.h#93 integrate
.. //depot/projects/smpng/sys/sys/vimage.h#7 integrate
.. //depot/projects/smpng/sys/sys/vnode.h#98 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_snapshot.c#73 integrate
.. //depot/projects/smpng/sys/vm/vm_map.c#95 integrate
.. //depot/projects/smpng/sys/vm/vm_map.h#42 integrate
.. //depot/projects/smpng/sys/vm/vm_reserv.c#3 integrate
.. //depot/projects/smpng/sys/vm/vm_unix.c#14 integrate

Differences ...

==== //depot/projects/smpng/sys/amd64/amd64/busdma_machdep.c#31 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.88 2009/02/09 18:03:31 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.89 2009/04/13 19:20:32 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -606,7 +606,10 @@
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
 			vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));

==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#78 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.698 2009/04/01 13:09:26 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.699 2009/04/11 14:01:01 ed Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -2178,45 +2178,24 @@
 #ifdef KDB
 
 /*
- * Provide inb() and outb() as functions.  They are normally only
- * available as macros calling inlined functions, thus cannot be
- * called from the debugger.
- *
- * The actual code is stolen from <machine/cpufunc.h>, and de-inlined.
+ * Provide inb() and outb() as functions.  They are normally only available as
+ * inline functions, thus cannot be called from the debugger.
  */
 
-#undef inb
-#undef outb
-
 /* silence compiler warnings */
-u_char inb(u_int);
-void outb(u_int, u_char);
+u_char inb_(u_short);
+void outb_(u_short, u_char);
 
 u_char
-inb(u_int port)
+inb_(u_short port)
 {
-	u_char	data;
-	/*
-	 * We use %%dx and not %1 here because i/o is done at %dx and not at
-	 * %edx, while gcc generates inferior code (movw instead of movl)
-	 * if we tell it to load (u_short) port.
-	 */
-	__asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port));
-	return (data);
+	return inb(port);
 }
 
 void
-outb(u_int port, u_char data)
+outb_(u_short port, u_char data)
 {
-	u_char	al;
-	/*
-	 * Use an unnecessary assignment to help gcc's register allocator.
-	 * This make a large difference for gcc-1.40 and a tiny difference
-	 * for gcc-2.6.0.  For gcc-1.40, al had to be ``asm("ax")'' for
-	 * best results.  gcc-2.6.0 can't handle this.
-	 */
-	al = data;
-	__asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port));
+	outb(port, data);
 }
 
 #endif /* KDB */

==== //depot/projects/smpng/sys/amd64/conf/GENERIC#75 (text+ko) ====

@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.522 2009/03/19 20:33:26 thompsa Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.523 2009/04/10 00:40:48 jfv Exp $
 
 cpu		HAMMER
 ident		GENERIC
@@ -200,7 +200,7 @@
 device		de		# DEC/Intel DC21x4x (``Tulip'')
 device		em		# Intel PRO/1000 Gigabit Ethernet Family
 device		igb		# Intel PRO/1000 PCIE Server Gigabit Family
-device		ixgb		# Intel PRO/10GbE Ethernet Card
+device		ixgbe		# Intel PRO/10GbE PCIE Ethernet Family
 device		le		# AMD Am7900 LANCE and Am79C9xx PCnet
 device		ti		# Alteon Networks Tigon I/II gigabit Ethernet
 device		txp		# 3Com 3cR990 (``Typhoon'')

==== //depot/projects/smpng/sys/amd64/include/cpufunc.h#16 (text+ko) ====

@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.151 2009/01/31 11:37:21 obrien Exp $
+ * $FreeBSD: src/sys/amd64/include/cpufunc.h,v 1.153 2009/04/11 14:01:01 ed Exp $
  */
 
 /*
@@ -164,79 +164,21 @@
 	__asm __volatile("hlt");
 }
 
-#if !defined(__GNUCLIKE_BUILTIN_CONSTANT_P) || __GNUCLIKE_ASM < 3
-
-#define	inb(port)		inbv(port)
-#define	outb(port, data)	outbv(port, data)
-
-#else /* __GNUCLIKE_BUILTIN_CONSTANT_P && __GNUCLIKE_ASM >= 3 */
-
-/*
- * The following complications are to get around gcc not having a
- * constraint letter for the range 0..255.  We still put "d" in the
- * constraint because "i" isn't a valid constraint when the port
- * isn't constant.  This only matters for -O0 because otherwise
- * the non-working version gets optimized away.
- * 
- * Use an expression-statement instead of a conditional expression
- * because gcc-2.6.0 would promote the operands of the conditional
- * and produce poor code for "if ((inb(var) & const1) == const2)".
- *
- * The unnecessary test `(port) < 0x10000' is to generate a warning if
- * the `port' has type u_short or smaller.  Such types are pessimal.
- * This actually only works for signed types.  The range check is
- * careful to avoid generating warnings.
- */
-#define	inb(port) __extension__ ({					\
-	u_char	_data;							\
-	if (__builtin_constant_p(port) && ((port) & 0xffff) < 0x100	\
-	    && (port) < 0x10000)					\
-		_data = inbc(port);					\
-	else								\
-		_data = inbv(port);					\
-	_data; })
-
-#define	outb(port, data) (						\
-	__builtin_constant_p(port) && ((port) & 0xffff) < 0x100		\
-	&& (port) < 0x10000						\
-	? outbc(port, data) : outbv(port, data))
-
 static __inline u_char
-inbc(u_int port)
+inb(u_int port)
 {
 	u_char	data;
 
-	__asm __volatile("inb %1,%0" : "=a" (data) : "id" ((u_short)(port)));
+	__asm volatile("inb %w1, %0" : "=a" (data) : "Nd" (port));
 	return (data);
 }
 
-static __inline void
-outbc(u_int port, u_char data)
-{
-	__asm __volatile("outb %0,%1" : : "a" (data), "id" ((u_short)(port)));
-}
-
-#endif /* __GNUCLIKE_BUILTIN_CONSTANT_P  && __GNUCLIKE_ASM >= 3*/
-
-static __inline u_char
-inbv(u_int port)
-{
-	u_char	data;
-	/*
-	 * We use %%dx and not %1 here because i/o is done at %dx and not at
-	 * %edx, while gcc generates inferior code (movw instead of movl)
-	 * if we tell it to load (u_short) port.
-	 */
-	__asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port));
-	return (data);
-}
-
 static __inline u_int
 inl(u_int port)
 {
 	u_int	data;
 
-	__asm __volatile("inl %%dx,%0" : "=a" (data) : "d" (port));
+	__asm volatile("inl %w1, %0" : "=a" (data) : "Nd" (port));
 	return (data);
 }
 
@@ -278,33 +220,20 @@
 {
 	u_short	data;
 
-	__asm __volatile("inw %%dx,%0" : "=a" (data) : "d" (port));
+	__asm volatile("inw %w1, %0" : "=a" (data) : "Nd" (port));
 	return (data);
 }
 
 static __inline void
-outbv(u_int port, u_char data)
+outb(u_int port, u_char data)
 {
-	u_char	al;
-	/*
-	 * Use an unnecessary assignment to help gcc's register allocator.
-	 * This make a large difference for gcc-1.40 and a tiny difference
-	 * for gcc-2.6.0.  For gcc-1.40, al had to be ``asm("ax")'' for
-	 * best results.  gcc-2.6.0 can't handle this.
-	 */
-	al = data;
-	__asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port));
+	__asm volatile("outb %0, %w1" : : "a" (data), "Nd" (port));
 }
 
 static __inline void
 outl(u_int port, u_int data)
 {
-	/*
-	 * outl() and outw() aren't used much so we haven't looked at
-	 * possible micro-optimizations such as the unnecessary
-	 * assignment for them.
-	 */
-	__asm __volatile("outl %0,%%dx" : : "a" (data), "d" (port));
+	__asm volatile("outl %0, %w1" : : "a" (data), "Nd" (port));
 }
 
 static __inline void
@@ -334,7 +263,7 @@
 static __inline void
 outw(u_int port, u_short data)
 {
-	__asm __volatile("outw %0,%%dx" : : "a" (data), "d" (port));
+	__asm volatile("outw %0, %w1" : : "a" (data), "Nd" (port));
 }
 
 static __inline void
@@ -535,12 +464,9 @@
 static __inline void
 load_fs(u_int sel)
 {
-	register u_int32_t fsbase __asm("ecx");
-
 	/* Preserve the fsbase value across the selector load */
-	fsbase = MSR_FSBASE;
-        __asm __volatile("rdmsr; mov %0,%%fs; wrmsr"
-            : : "rm" (sel), "c" (fsbase) : "eax", "edx");
+	__asm __volatile("rdmsr; mov %0,%%fs; wrmsr"
+	    : : "rm" (sel), "c" (MSR_FSBASE) : "eax", "edx");
 }
 
 #ifndef	MSR_GSBASE
@@ -549,16 +475,13 @@
 static __inline void
 load_gs(u_int sel)
 {
-	register u_int32_t gsbase __asm("ecx");
-
 	/*
 	 * Preserve the gsbase value across the selector load.
 	 * Note that we have to disable interrupts because the gsbase
 	 * being trashed happens to be the kernel gsbase at the time.
 	 */
-	gsbase = MSR_GSBASE;
-        __asm __volatile("pushfq; cli; rdmsr; mov %0,%%gs; wrmsr; popfq"
-            : : "rm" (sel), "c" (gsbase) : "eax", "edx");
+	__asm __volatile("pushfq; cli; rdmsr; mov %0,%%gs; wrmsr; popfq"
+	    : : "rm" (sel), "c" (MSR_GSBASE) : "eax", "edx");
 }
 #else
 /* Usable by userland */

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

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)endian.h	7.8 (Berkeley) 4/3/91
- * $FreeBSD: src/sys/amd64/include/endian.h,v 1.8 2005/03/11 21:46:01 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/endian.h,v 1.10 2009/04/08 19:10:20 ed Exp $
  */
 
 #ifndef _MACHINE_ENDIAN_H_
@@ -69,25 +69,6 @@
 
 #if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE_BUILTIN_CONSTANT_P)
 
-#define __word_swap_int_var(x) \
-__extension__ ({ register __uint32_t __X = (x); \
-   __asm ("rorl $16, %0" : "+r" (__X)); \
-   __X; })
-
-#ifdef __OPTIMIZE__
-
-#define	__word_swap_int_const(x) \
-	((((x) & 0xffff0000) >> 16) | \
-	 (((x) & 0x0000ffff) << 16))
-#define	__word_swap_int(x) (__builtin_constant_p(x) ? \
-	__word_swap_int_const(x) : __word_swap_int_var(x))
-
-#else	/* __OPTIMIZE__ */
-
-#define	__word_swap_int(x) __word_swap_int_var(x)
-
-#endif	/* __OPTIMIZE__ */
-
 #define __byte_swap_int_var(x) \
 __extension__ ({ register __uint32_t __X = (x); \
    __asm ("bswap %0" : "+r" (__X)); \
@@ -135,26 +116,6 @@
 
 #endif	/* __OPTIMIZE__ */
 
-#define __byte_swap_word_var(x) \
-__extension__ ({ register __uint16_t __X = (x); \
-   __asm ("xchgb %h0, %b0" : "+Q" (__X)); \
-   __X; })
-
-#ifdef __OPTIMIZE__
-
-#define	__byte_swap_word_const(x) \
-	((((x) & 0xff00) >> 8) | \
-	 (((x) & 0x00ff) << 8))
-
-#define	__byte_swap_word(x) (__builtin_constant_p(x) ? \
-	__byte_swap_word_const(x) : __byte_swap_word_var(x))
-
-#else	/* __OPTIMIZE__ */
-
-#define	__byte_swap_word(x) __byte_swap_word_var(x)
-
-#endif	/* __OPTIMIZE__ */
-
 static __inline __uint64_t
 __bswap64(__uint64_t _x)
 {
@@ -172,8 +133,7 @@
 static __inline __uint16_t
 __bswap16(__uint16_t _x)
 {
-
-	return (__byte_swap_word(_x));
+	return (_x << 8 | _x >> 8);
 }
 
 #define	__htonl(x)	__bswap32(x)

==== //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#29 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.44 2009/02/09 18:03:31 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.45 2009/04/13 19:20:32 kib Exp $");
 
 /*
  * ARM bus dma support routines
@@ -669,8 +669,8 @@
 }
 
 static int
-_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
-			bus_size_t buflen, int flags)
+_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
+    void *buf, bus_size_t buflen, int flags)
 {
 	vm_offset_t vaddr;
 	vm_offset_t vendaddr;
@@ -689,7 +689,10 @@
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap != NULL)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
 			    run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
@@ -745,7 +748,8 @@
 	bmask = ~(dmat->boundary - 1);
 
 	if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) {
-		error = _bus_dmamap_count_pages(dmat, map, buf, buflen, flags);
+		error = _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen,
+		    flags);
 		if (error)
 			return (error);
 	}

==== //depot/projects/smpng/sys/arm/arm/trap.c#30 (text+ko) ====

@@ -82,7 +82,7 @@
 #include "opt_ktrace.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.37 2008/03/12 10:11:55 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.39 2009/04/08 13:01:18 raj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -520,7 +520,8 @@
 	printf(", pc =%08x\n\n", tf->tf_pc);
 
 #ifdef KDB
-	kdb_trap(fsr, 0, tf);
+	if (debugger_on_panic || kdb_active)
+		kdb_trap(fsr, 0, tf);
 #endif
 	panic("Fatal abort");
 	/*NOTREACHED*/
@@ -530,7 +531,7 @@
  * dab_align() handles the following data aborts:
  *
  *  FAULT_ALIGN_0 - Alignment fault
- *  FAULT_ALIGN_0 - Alignment fault
+ *  FAULT_ALIGN_1 - Alignment fault
  *
  * These faults are fatal if they happen in kernel mode. Otherwise, we
  * deliver a bus error to the process.

==== //depot/projects/smpng/sys/boot/i386/libi386/Makefile#19 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.44 2009/03/09 17:16:29 jhb Exp $
+# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.45 2009/04/07 17:58:15 jkim Exp $
 #
 LIB=			i386
 INTERNALLIB=
@@ -31,6 +31,10 @@
 .if !defined(BOOT_HIDE_SERIAL_NUMBERS)
 # Export serial numbers, UUID, and asset tag from loader.
 CFLAGS+= -DSMBIOS_SERIAL_NUMBERS
+.if defined(BOOT_LITTLE_ENDIAN_UUID)
+# Use little-endian UUID format as defined in SMBIOS 2.6.
+CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID
+.endif
 .endif
 
 .if !defined(LOADER_NO_GPT_SUPPORT)

==== //depot/projects/smpng/sys/boot/i386/libi386/biosdisk.c#20 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.58 2009/03/12 20:41:52 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.59 2009/04/14 14:19:18 jhb Exp $");
 
 /*
  * BIOS disk device handling.
@@ -83,7 +83,7 @@
     int			od_cyl;			/* BIOS geometry */
     int			od_hds;
     int			od_sec;
-    int			od_boff;		/* block offset from beginning of BIOS disk */
+    daddr_t			od_boff;		/* block offset from beginning of BIOS disk */
     int			od_flags;
 #define BD_MODEINT13		0x0000
 #define BD_MODEEDD1		0x0001

==== //depot/projects/smpng/sys/boot/i386/libi386/smbios.c#8 (text+ko) ====

@@ -25,10 +25,11 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/smbios.c,v 1.9 2009/04/07 17:24:25 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/smbios.c,v 1.10 2009/04/07 17:58:15 jkim Exp $");
 
 #include <stand.h>
 #include <bootstrap.h>
+#include <sys/endian.h>
 
 #include "btxv86.h"
 #include "libi386.h"
@@ -37,17 +38,18 @@
  * Detect SMBIOS and export information about the SMBIOS into the
  * environment.
  *
- * System Management BIOS Reference Specification, v2.4 Final
- * http://www.dmtf.org/standards/published_documents/DSP0134.pdf
+ * System Management BIOS Reference Specification, v2.6 Final
+ * http://www.dmtf.org/standards/published_documents/DSP0134_2.6.0.pdf
  */
 
 /*
- * Spec. 2.1.1 SMBIOS Structure Table Entry Point
+ * 2.1.1 SMBIOS Structure Table Entry Point
  *
- * 'The SMBIOS Entry Point structure, described below, can be located by
- * application software by searching for the anchor-string on paragraph
- * (16-byte) boundaries within the physical memory address range
- * 000F0000h to 000FFFFFh.'
+ * "On non-EFI systems, the SMBIOS Entry Point structure, described below, can
+ * be located by application software by searching for the anchor-string on
+ * paragraph (16-byte) boundaries within the physical memory address range
+ * 000F0000h to 000FFFFFh. This entry point encapsulates an intermediate anchor
+ * string that is used by some existing DMI browsers."
  */
 #define	SMBIOS_START		0xf0000
 #define	SMBIOS_LENGTH		0x10000
@@ -55,100 +57,174 @@
 #define	SMBIOS_SIG		"_SM_"
 #define	SMBIOS_DMI_SIG		"_DMI_"
 
+#define	SMBIOS_GET8(base, off)	(*(uint8_t *)((base) + (off)))
+#define	SMBIOS_GET16(base, off)	(*(uint16_t *)((base) + (off)))
+#define	SMBIOS_GET32(base, off)	(*(uint32_t *)((base) + (off)))
+
+#define	SMBIOS_GETLEN(base)	SMBIOS_GET8(base, 0x01)
+#define	SMBIOS_GETSTR(base)	((base) + SMBIOS_GETLEN(base))
+
 static uint32_t	smbios_enabled_memory = 0;
 static uint32_t	smbios_old_enabled_memory = 0;
 static uint8_t	smbios_enabled_sockets = 0;
 static uint8_t	smbios_populated_sockets = 0;
 
-static uint8_t	*smbios_parse_table(const uint8_t *dmi);
-static void	smbios_setenv(const char *name, const uint8_t *dmi,
-		    const int offset);
-static uint8_t	smbios_checksum(const caddr_t addr, const uint8_t len);
-static uint8_t	*smbios_sigsearch(const caddr_t addr, const uint32_t len);
+static uint8_t
+smbios_checksum(const caddr_t addr, const uint8_t len)
+{
+	uint8_t		sum;
+	int		i;
 
-#ifdef SMBIOS_SERIAL_NUMBERS
-static void	smbios_setuuid(const char *name, const uint8_t *dmi,
-		    const int offset);
-#endif
+	for (sum = 0, i = 0; i < len; i++)
+		sum += SMBIOS_GET8(addr, i);
+	return (sum);
+}
 
-void
-smbios_detect(void)
+static caddr_t
+smbios_sigsearch(const caddr_t addr, const uint32_t len)
 {
-	uint8_t		*smbios, *dmi, *addr;
-	uint16_t	i, length, count;
-	uint32_t	paddr;
-	char		buf[16];
+	caddr_t		cp;
 
-	/* locate and validate the SMBIOS */
-	smbios = smbios_sigsearch(PTOV(SMBIOS_START), SMBIOS_LENGTH);
-	if (smbios == NULL)
-		return;
+	/* Search on 16-byte boundaries. */
+	for (cp = addr; cp < addr + len; cp += SMBIOS_STEP)
+		if (strncmp(cp, SMBIOS_SIG, 4) == 0 &&
+		    smbios_checksum(cp, SMBIOS_GET8(cp, 0x05)) == 0 &&
+		    strncmp(cp + 0x10, SMBIOS_DMI_SIG, 5) == 0 &&
+		    smbios_checksum(cp + 0x10, 0x0f) == 0)
+			return (cp);
+	return (NULL);
+}
 
-	length = *(uint16_t *)(smbios + 0x16);	/* Structure Table Length */
-	paddr = *(uint32_t *)(smbios + 0x18);	/* Structure Table Address */
-	count = *(uint16_t *)(smbios + 0x1c);	/* No of SMBIOS Structures */
+static void
+smbios_setenv(const char *name, caddr_t addr, const int offset)
+{
+	caddr_t		cp;
+	int		i, idx;
 
-	for (dmi = addr = PTOV(paddr), i = 0;
-	     dmi - addr < length && i < count; i++)
-		dmi = smbios_parse_table(dmi);
-	if (smbios_enabled_memory > 0 || smbios_old_enabled_memory > 0) {
-		sprintf(buf, "%u", smbios_enabled_memory > 0 ?
-		    smbios_enabled_memory : smbios_old_enabled_memory);
-		setenv("smbios.memory.enabled", buf, 1);
+	idx = SMBIOS_GET8(addr, offset);
+	if (idx != 0) {
+		cp = SMBIOS_GETSTR(addr);
+		for (i = 1; i < idx; i++)
+			cp += strlen(cp) + 1;
+		setenv(name, cp, 1);
 	}
-	if (smbios_enabled_sockets > 0) {
-		sprintf(buf, "%u", smbios_enabled_sockets);
-		setenv("smbios.socket.enabled", buf, 1);
+}
+
+#ifdef SMBIOS_SERIAL_NUMBERS
+
+#define	UUID_SIZE		16
+#define	UUID_TYPE		uint32_t
+#define	UUID_STEP		sizeof(UUID_TYPE)
+#define	UUID_ALL_BITS		(UUID_SIZE / UUID_STEP)
+#define	UUID_GET(base, off)	(*(UUID_TYPE *)((base) + (off)))
+
+static void
+smbios_setuuid(const char *name, const caddr_t addr, const int ver)
+{
+	char		uuid[37];
+	int		i, ones, zeros;
+	UUID_TYPE	n;
+	uint32_t	f1;
+	uint16_t	f2, f3;
+
+	for (i = 0, ones = 0, zeros = 0; i < UUID_SIZE; i += UUID_STEP) {
+		n = UUID_GET(addr, i) + 1;
+		if (zeros == 0 && n == 0)
+			ones++;
+		else if (ones == 0 && n == 1)
+			zeros++;
+		else
+			break;
 	}
-	if (smbios_populated_sockets > 0) {
-		sprintf(buf, "%u", smbios_populated_sockets);
-		setenv("smbios.socket.populated", buf, 1);
+
+	if (ones != UUID_ALL_BITS && zeros != UUID_ALL_BITS) {
+		/*
+		 * 3.3.2.1 System UUID
+		 *
+		 * "Although RFC 4122 recommends network byte order for all
+		 * fields, the PC industry (including the ACPI, UEFI, and
+		 * Microsoft specifications) has consistently used
+		 * little-endian byte encoding for the first three fields:
+		 * time_low, time_mid, time_hi_and_version. The same encoding,
+		 * also known as wire format, should also be used for the
+		 * SMBIOS representation of the UUID."
+		 *
+		 * Note: We use network byte order for backward compatibility
+		 * unless SMBIOS version is 2.6+ or little-endian is forced.
+		 */
+#ifndef SMBIOS_LITTLE_ENDIAN_UUID
+		if (ver < 0x0206) {
+			f1 = ntohl(SMBIOS_GET32(addr, 0));
+			f2 = ntohs(SMBIOS_GET16(addr, 4));
+			f3 = ntohs(SMBIOS_GET16(addr, 6));
+		} else
+#endif
+		{
+			f1 = le32toh(SMBIOS_GET32(addr, 0));
+			f2 = le16toh(SMBIOS_GET16(addr, 4));
+			f3 = le16toh(SMBIOS_GET16(addr, 6));
+		}
+		sprintf(uuid,
+		    "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+		    f1, f2, f3, SMBIOS_GET8(addr, 8), SMBIOS_GET8(addr, 9),
+		    SMBIOS_GET8(addr, 10), SMBIOS_GET8(addr, 11),
+		    SMBIOS_GET8(addr, 12), SMBIOS_GET8(addr, 13),
+		    SMBIOS_GET8(addr, 14), SMBIOS_GET8(addr, 15));
+		setenv(name, uuid, 1);
 	}
 }
 
-static uint8_t *
-smbios_parse_table(const uint8_t *dmi)
+#undef UUID_SIZE
+#undef UUID_TYPE
+#undef UUID_STEP
+#undef UUID_ALL_BITS
+#undef UUID_GET
+
+#endif
+
+static caddr_t
+smbios_parse_table(const caddr_t addr, const int ver)
 {
-	uint8_t		*dp;
-	uint16_t	size;
-	uint8_t		osize;
+	caddr_t		cp;
+	int		proc, size, osize, type;
 
-	switch(dmi[0]) {
-	case 0:		/* Type 0: BIOS */
-		smbios_setenv("smbios.bios.vendor", dmi, 0x04);
-		smbios_setenv("smbios.bios.version", dmi, 0x05);
-		smbios_setenv("smbios.bios.reldate", dmi, 0x08);
+	type = SMBIOS_GET8(addr, 0);	/* 3.1.2 Structure Header Format */
+	switch(type) {
+	case 0:		/* 3.3.1 BIOS Information (Type 0) */
+		smbios_setenv("smbios.bios.vendor", addr, 0x04);
+		smbios_setenv("smbios.bios.version", addr, 0x05);
+		smbios_setenv("smbios.bios.reldate", addr, 0x08);
 		break;
 
-	case 1:		/* Type 1: System */
-		smbios_setenv("smbios.system.maker", dmi, 0x04);
-		smbios_setenv("smbios.system.product", dmi, 0x05);
-		smbios_setenv("smbios.system.version", dmi, 0x06);
+	case 1:		/* 3.3.2 System Information (Type 1) */
+		smbios_setenv("smbios.system.maker", addr, 0x04);
+		smbios_setenv("smbios.system.product", addr, 0x05);
+		smbios_setenv("smbios.system.version", addr, 0x06);
 #ifdef SMBIOS_SERIAL_NUMBERS
-		smbios_setenv("smbios.system.serial", dmi, 0x07);
-		smbios_setuuid("smbios.system.uuid", dmi, 0x08);
+		smbios_setenv("smbios.system.serial", addr, 0x07);
+		smbios_setuuid("smbios.system.uuid", addr + 0x08, ver);
 #endif
 		break;
 
-	case 2:		/* Type 2: Base Board (or Module) */
-		smbios_setenv("smbios.planar.maker", dmi, 0x04);
-		smbios_setenv("smbios.planar.product", dmi, 0x05);
-		smbios_setenv("smbios.planar.version", dmi, 0x06);
+	case 2:		/* 3.3.3 Base Board (or Module) Information (Type 2) */
+		smbios_setenv("smbios.planar.maker", addr, 0x04);
+		smbios_setenv("smbios.planar.product", addr, 0x05);
+		smbios_setenv("smbios.planar.version", addr, 0x06);
 #ifdef SMBIOS_SERIAL_NUMBERS
-		smbios_setenv("smbios.planar.serial", dmi, 0x07);
+		smbios_setenv("smbios.planar.serial", addr, 0x07);
 #endif
 		break;
 
-	case 3:		/* Type 3: System Enclosure or Chassis */
-		smbios_setenv("smbios.chassis.maker", dmi, 0x04);
-		smbios_setenv("smbios.chassis.version", dmi, 0x06);
+	case 3:		/* 3.3.4 System Enclosure or Chassis (Type 3) */
+		smbios_setenv("smbios.chassis.maker", addr, 0x04);
+		smbios_setenv("smbios.chassis.version", addr, 0x06);
 #ifdef SMBIOS_SERIAL_NUMBERS
-		smbios_setenv("smbios.chassis.serial", dmi, 0x07);
-		smbios_setenv("smbios.chassis.tag", dmi, 0x08);
+		smbios_setenv("smbios.chassis.serial", addr, 0x07);
+		smbios_setenv("smbios.chassis.tag", addr, 0x08);
 #endif
 		break;
 
-	case 4:		/* Type 4: Processor Information */
+	case 4:		/* 3.3.5 Processor Information (Type 4) */

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list